From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 3 05:09:47 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F318D106566B; Sun, 3 Jun 2012 05:09:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 747358FC0A; Sun, 3 Jun 2012 05:09:45 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q5359e5Z014776; Sun, 3 Jun 2012 08:09:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q5359dgF082040; Sun, 3 Jun 2012 08:09:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q5359dNZ082039; Sun, 3 Jun 2012 08:09:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 3 Jun 2012 08:09:39 +0300 From: Konstantin Belousov To: Benjamin Kaduk Message-ID: <20120603050939.GF2358@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yZITfl9WLeKOcFOX" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-hackers@freebsd.org Subject: Re: namecache documentation and locking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 05:09:47 -0000 --yZITfl9WLeKOcFOX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 02, 2012 at 11:34:21PM +0000, Benjamin Kaduk wrote: > Hi all, >=20 > My colleague recently pointed out to me that I was calling vgone() when I= =20 > probably wanted to be using cache_purge() (as is done for implementations= =20 > of this OS-specific function in other BSDs [1]). >=20 > This caused me to take a look at the namecache functions and find not ver= y=20 > much documentation of their use. I see that NetBSD has had a namecache.9= =20 > man page since 2001 [2], and their actual code shares its origin from 4.2= =20 > BSD with ours ... but our vfs_cache.c is at (CVS) revision 1.181 versus= =20 > NetBSD's 1.88, and there are at least superficial differences between the= =20 > two. Superficial ? How can you judge ? >=20 > Is there a summary of the design/implementation somewhere that I could us= e=20 > as a reference, or can someone send one here? I would like to come up=20 > with a namecache.9 for FreeBSD's implementation. >=20 > The particular question which promped my investigation is for the locking= =20 > around cache_purge(); I was not immediately able to tell from looking at= =20 > other consumers whether the vnode lock needs to or should be held around= =20 > such calls. Looking at the implementation of some of the other namecache= =20 > functions makes it seem that the lock order is vnode lock then namecache= =20 > lock, which would suggest that holding the vnode lock across cache_purge= =20 > would be okay, but I would like some confirmation before I use and=20 > document it as such. Vnode lock is not needed around cache_purge(). This is in fact documented by not making asserts for lock ownership inside the function. The cache_purge() does not operate on any fs-specific data associated with the vnode, and the data it does operate on is protected by namecache rwlock. The only guarantee which cache_purge() needs from its caller is that passed vnode pointer remains valid for duration of the call, which is normally ensured by holding the vnode, often implicitely. The order between namecache rwlock and vnode lock is obvious, since vnode lock is lockmgr/sleepable. On the other hand, vnode interlock is after namecache rwlock. --yZITfl9WLeKOcFOX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/K8ZMACgkQC3+MBN1Mb4g2SQCgwyQLmW5x1SqBzRJcj54Lm2Ji 8ysAnisOdjEwdKjpUweFKqbnTUDlYKwJ =s5K0 -----END PGP SIGNATURE----- --yZITfl9WLeKOcFOX-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 3 06:13:24 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B44C81065672 for ; Sun, 3 Jun 2012 06:13:24 +0000 (UTC) (envelope-from bjk@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7FF248FC15; Sun, 3 Jun 2012 06:13:24 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q536DOFZ062227; Sun, 3 Jun 2012 06:13:24 GMT (envelope-from bjk@freebsd.org) Received: from localhost (bjk@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) with ESMTP id q536DOce062212; Sun, 3 Jun 2012 06:13:24 GMT (envelope-from bjk@freebsd.org) X-Authentication-Warning: freefall.freebsd.org: bjk owned process doing -bs Date: Sun, 3 Jun 2012 06:13:24 +0000 (UTC) From: Benjamin Kaduk To: Konstantin Belousov In-Reply-To: <20120603050939.GF2358@deviant.kiev.zoral.com.ua> Message-ID: References: <20120603050939.GF2358@deviant.kiev.zoral.com.ua> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: namecache documentation and locking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 06:13:24 -0000 On Sun, 3 Jun 2012, Konstantin Belousov wrote: > On Sat, Jun 02, 2012 at 11:34:21PM +0000, Benjamin Kaduk wrote: >> Hi all, >> >> This caused me to take a look at the namecache functions and find not very >> much documentation of their use. I see that NetBSD has had a namecache.9 >> man page since 2001 [2], and their actual code shares its origin from 4.2 >> BSD with ours ... but our vfs_cache.c is at (CVS) revision 1.181 versus >> NetBSD's 1.88, and there are at least superficial differences between the >> two. > Superficial ? How can you judge ? Well, the first thing that came to mind was that we have struct namecache_ts that was recently added. It looks like NetBSD also has per-cpu namecache data (I just noticed). They also use explicit mutex operations on the namecache_lock as opposed to our macros around the rwlock cache_lock. I have not put in the time to tell whether these represent significant structural differences or just superficial renaming. > >> >> Is there a summary of the design/implementation somewhere that I could use That sounds like 'no'. >> as a reference, or can someone send one here? I would like to come up >> with a namecache.9 for FreeBSD's implementation. >> >> The particular question which promped my investigation is for the locking >> around cache_purge(); I was not immediately able to tell from looking at >> other consumers whether the vnode lock needs to or should be held around >> such calls. Looking at the implementation of some of the other namecache >> functions makes it seem that the lock order is vnode lock then namecache >> lock, which would suggest that holding the vnode lock across cache_purge >> would be okay, but I would like some confirmation before I use and >> document it as such. > Vnode lock is not needed around cache_purge(). This is in fact documented > by not making asserts for lock ownership inside the function. I was not sufficiently confident to rely on such negative documentation from code. > > The cache_purge() does not operate on any fs-specific data associated > with the vnode, and the data it does operate on is protected by > namecache rwlock. The only guarantee which cache_purge() needs from its > caller is that passed vnode pointer remains valid for duration of the > call, which is normally ensured by holding the vnode, often implicitely. > It seemed so to me; thank you for confirming. > The order between namecache rwlock and vnode lock is obvious, since vnode > lock is lockmgr/sleepable. On the other hand, vnode interlock is after > namecache rwlock. I missed this, it is helpful to know. Thanks, Ben From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 3 07:14:26 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1BB2F106566B for ; Sun, 3 Jun 2012 07:14:26 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 82D198FC15 for ; Sun, 3 Jun 2012 07:14:25 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q537EKPV051410; Sun, 3 Jun 2012 09:14:20 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q537EKQx051407; Sun, 3 Jun 2012 09:14:20 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sun, 3 Jun 2012 09:14:20 +0200 (CEST) From: Wojciech Puchar To: Fabian Keil In-Reply-To: <20120602223744.4a54734e.fk@fabiankeil.de> Message-ID: References: <20120602223744.4a54734e.fk@fabiankeil.de> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sun, 03 Jun 2012 09:14:20 +0200 (CEST) Cc: freebsd-hackers@freebsd.org Subject: Re: geli conversion X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 07:14:26 -0000 that simple :) i user setkey to change password but wasn't aware i can switch from keyfile based volume. On Sat, 2 Jun 2012, Fabian Keil wrote: > Wojciech Puchar wrote: > >> is it possible to convert geli encrypted device using keyfile to password >> only? >> >> possibly i miss something in manual. thanks. > > The geli(8) action you are looking for is called setkey. > > Fabian > From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 3 08:25:32 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3C351065670 for ; Sun, 3 Jun 2012 08:25:32 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 3BAFB8FC08 for ; Sun, 3 Jun 2012 08:25:30 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q538PL2t055336 for ; Sun, 3 Jun 2012 10:25:21 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q538PLd9055333 for ; Sun, 3 Jun 2012 10:25:21 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sun, 3 Jun 2012 10:25:21 +0200 (CEST) From: Wojciech Puchar To: freebsd-hackers@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sun, 03 Jun 2012 10:25:21 +0200 (CEST) Subject: reverse USB driver - is it possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 08:25:33 -0000 for SCSI/SAS/FC there is targ(4) driver allows you to become SCSI target. is it the same possible with USB? i mean if i can make my laptop to simulate say USB CDROM. Yes there are no driver line targ(4) for USB, but it is technically possible hardware-wise? with any USB controler or special one? From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 3 09:14:33 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8AB41065673 for ; Sun, 3 Jun 2012 09:14:33 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.c2i.net [212.247.154.2]) by mx1.freebsd.org (Postfix) with ESMTP id 6249A8FC08 for ; Sun, 3 Jun 2012 09:14:33 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 284304840; Sun, 03 Jun 2012 11:14:25 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Sun, 3 Jun 2012 11:13:45 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-STABLE; KDE/4.7.4; amd64; ; ) References: In-Reply-To: X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201206031113.46034.hselasky@c2i.net> Cc: Wojciech Puchar Subject: Re: reverse USB driver - is it possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 09:14:33 -0000 On Sunday 03 June 2012 10:25:21 Wojciech Puchar wrote: > for SCSI/SAS/FC there is targ(4) driver allows you to become SCSI target. > > is it the same possible with USB? > i mean if i can make my laptop to simulate say USB CDROM. > > Yes there are no driver line targ(4) for USB, but it is technically > possible hardware-wise? with any USB controler or special one? Yes, this is possible. Have a look at: sys/dev/usb/storage/ustorage_fs.c Currently just implements a RAM disk. Patches are welcome. --HPS From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 3 08:27:29 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C67E8106568C for ; Sun, 3 Jun 2012 08:27:29 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 82EBB8FC23 for ; Sun, 3 Jun 2012 08:27:29 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 2F96013F36; Sun, 3 Jun 2012 08:27:28 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.5/8.14.5) with ESMTP id q538RREC015393; Sun, 3 Jun 2012 08:27:27 GMT (envelope-from phk@phk.freebsd.dk) To: Wojciech Puchar From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 03 Jun 2012 10:25:21 +0200." Content-Type: text/plain; charset=ISO-8859-1 Date: Sun, 03 Jun 2012 08:27:27 +0000 Message-ID: <15392.1338712047@critter.freebsd.dk> X-Mailman-Approved-At: Sun, 03 Jun 2012 11:15:02 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: reverse USB driver - is it possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 08:27:29 -0000 In message , Wojci ech Puchar writes: >is it the same possible with USB? >i mean if i can make my laptop to simulate say USB CDROM. No, the hardware is not up to it. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 3 12:43:50 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95F20106566B for ; Sun, 3 Jun 2012 12:43:50 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0F05F8FC08 for ; Sun, 3 Jun 2012 12:43:49 +0000 (UTC) Received: by laai10 with SMTP id i10so3119553laa.13 for ; Sun, 03 Jun 2012 05:43:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=pQB8jcinzTj/b3ovAtz9UniQK1z4qbtBgozlFbBgWcE=; b=sFV4Xnpa8X8xEMWWPJiKHRL/1y2fT6UMyNiBARp4t1SF8LT3DkcB4hbVRuPZrPsWrf XQcCKBX8xQ8PEM8ydFfJvIdpE7DTPLh5qI/pO1DsvtpQuNBIPRBsaHZ3MAXPblsylWRX L6EnVsrdsQ6HmuLjDq1MivNOMX+HqGNEpel1AUJ5Ql0Of5vluqWaQoHCNEbTeyMyai1w i8VXYkhBlguyNc0ODyqRf20uh53sTTHJo6CWR3RXt3kHqRJZod6hbk4LIkm7EDsQA2IK GsniD39Ln4rxy5efadPVrgwMJTyuCzgQBahIR3PA7sU1XW8slwwSmwDjPi0nONUEiea+ S1/w== Received: by 10.152.104.171 with SMTP id gf11mr9189863lab.5.1338727428703; Sun, 03 Jun 2012 05:43:48 -0700 (PDT) Received: from localhost ([78.157.92.5]) by mx.google.com with ESMTPS id xx8sm12647568lab.10.2012.06.03.05.43.46 (version=SSLv3 cipher=OTHER); Sun, 03 Jun 2012 05:43:46 -0700 (PDT) Date: Sun, 3 Jun 2012 15:43:42 +0300 From: Gleb Kurtsou To: enrico d'urso Message-ID: <20120603124342.GA1225@reks> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org Subject: Re: [Hash function Ipv4] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 12:43:50 -0000 On (02/06/2012 20:14), enrico d'urso wrote: > > Hi, > I'm looking for an Hash function for Ipv4 addresses. > > What are good ones? Have you tried good general purpose hash functions like murmur3 or cityhash? Another option is to use "hash" function that is bijection on integers and exploit this fact in data structure, e.g. by using hash array mapped trie or another prefix tree. The easiest way to build such function is Feistel network on top of general purpose hash function as round function. Li and Ri will be most and less significant 16 bits of ipv4 address accordingly. At least 3 Fiestel rounds required. Play with function to achieve better performance/distribution. https://en.wikipedia.org/wiki/Feistel_cipher Reduced round and block size RC5 also looks very attractive, but it's patented :( Thanks, Gleb. From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 3 17:22:07 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27289106566B for ; Sun, 3 Jun 2012 17:22:07 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9EEB38FC15 for ; Sun, 3 Jun 2012 17:22:06 +0000 (UTC) Received: by bkvi18 with SMTP id i18so3929713bkv.13 for ; Sun, 03 Jun 2012 10:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=SLLiqU5XFitIN1PL9+g3JG2Z7qvc4+cO+b7DBsKisXA=; b=Vb8BAhspbE5zUh4XeII4P0/5zjSpruJFemjRnG9g1D1Qllh5ywIxg2UwH3HlOFqabv JTHtuyoVtMDloBNDKrNeu+UV6mspMYGy56SoCuX9B8RQIX/A4N5L4x2vu+U2JnwhKtoI NxcDUjBs5orcdbn00k4T4/cE7aHCbMzRW32tpAFO2ptuVw0F4FuPoP/E1AqD3YcLCGNh HzlYdYY3Q23GR+hJB8hmXjIFWwUXhFcx1LJMAOXnp5l6AGXnIOSM/8X/rGydQKobHCIZ fzjC9zRpxLlOVXUGVWngJsNMUZBBuH88i/dbiC2h5Wub5shvUWSJ3P5GYORv1mUS4mZN hr1w== Received: by 10.205.117.3 with SMTP id fk3mr5044940bkc.136.1338744125283; Sun, 03 Jun 2012 10:22:05 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.204.171.138 with HTTP; Sun, 3 Jun 2012 10:21:35 -0700 (PDT) In-Reply-To: References: From: Chris Rees Date: Sun, 3 Jun 2012 18:21:35 +0100 X-Google-Sender-Auth: KF7qBEY4JFKPO0R58nCuahAR5bM Message-ID: To: Wojciech Puchar Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: reverse USB driver - is it possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 17:22:07 -0000 On 3 June 2012 09:25, Wojciech Puchar wrote: > for SCSI/SAS/FC there is targ(4) driver allows you to become SCSI target. > > is it the same possible with USB? > i mean if i can make my laptop to simulate say USB CDROM. > > Yes there are no driver line targ(4) for USB, but it is technically possible > hardware-wise? with any USB controler or special one? USB is not peer-to-peer. Try Firewire/1394. Chris From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 3 18:24:19 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67E6B1065672 for ; Sun, 3 Jun 2012 18:24:19 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3A3B78FC15 for ; Sun, 3 Jun 2012 18:24:19 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so5348594pbb.13 for ; Sun, 03 Jun 2012 11:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=7cfVoktAIZMO7pv/6EKBBFFmlG4qgNwr30/NmLVM1HM=; b=05hUdbc6ljRKXvWkHrDpmV9lBVuZ6y5A5nsrIC4NVExsiIhLEuZsuaZvzZaQSklAUS LbZ3CQfziRiiJiL0eKaOn3lDpzvSku1mb2INEuIPzNsW+rgvlwAM6X0klahEtJsVnGFm vnHo42jqZR6kBuBM+W46Hs4OdBkqNMih0WK3WBhViwyGgbXO8iAB90zM6ts4gLMtqcFg HPFvwqgZK4Ay6ybYf0ZlKmxhHIkr35XAsf2RLfTqA9L7RhXhsyj++CO+crvHRVEhHyac 1aZLaprGtmDn2t0AY0A/BNZdaTI1d4pjE1E5qnsfqCwCUCywmFEaSstvR5tF/Zwj/wjp +UoQ== MIME-Version: 1.0 Received: by 10.68.116.203 with SMTP id jy11mr21578246pbb.129.1338747858847; Sun, 03 Jun 2012 11:24:18 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.143.91.18 with HTTP; Sun, 3 Jun 2012 11:24:18 -0700 (PDT) In-Reply-To: <15392.1338712047@critter.freebsd.dk> References: <15392.1338712047@critter.freebsd.dk> Date: Sun, 3 Jun 2012 11:24:18 -0700 X-Google-Sender-Auth: I1RIzbGhJF-gTukbCo4XdPsOU5o Message-ID: From: Adrian Chadd To: Poul-Henning Kamp Content-Type: text/plain; charset=ISO-8859-1 Cc: Wojciech Puchar , freebsd-hackers@freebsd.org Subject: Re: reverse USB driver - is it possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 18:24:19 -0000 On 3 June 2012 01:27, Poul-Henning Kamp wrote: > In message , Wojci > ech Puchar writes: > >>is it the same possible with USB? >>i mean if i can make my laptop to simulate say USB CDROM. > > No, the hardware is not up to it. Well, the embedded controller in the Atheros SoCs can act as a USB device and USB host, so it's certainly possible. I don't know if we have driver support in the tree for being a USB device though. Adrian From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 3 20:59:42 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 70D0F106564A for ; Sun, 3 Jun 2012 20:59:42 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id 01C9F8FC1C for ; Sun, 3 Jun 2012 20:59:41 +0000 (UTC) Received: from aspire.rulingia.com (12.58.233.220.static.exetel.com.au [220.233.58.12]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q53KxTRA080449 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 4 Jun 2012 06:59:32 +1000 (EST) (envelope-from peter@rulingia.com) Received: from aspire.rulingia.com (localhost [127.0.0.1]) by aspire.rulingia.com (8.14.5/8.14.5) with ESMTP id q53KvxDj079946 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Jun 2012 06:57:59 +1000 (EST) (envelope-from peter@aspire.rulingia.com) Received: (from peter@localhost) by aspire.rulingia.com (8.14.5/8.14.5/Submit) id q53KvvsO079945; Mon, 4 Jun 2012 06:57:57 +1000 (EST) (envelope-from peter) Date: Mon, 4 Jun 2012 06:57:56 +1000 From: Peter Jeremy To: Wojciech Puchar Message-ID: <20120603205756.GH2675@aspire.rulingia.com> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k+G3HLlWI7eRTl+h" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org Subject: Re: detailed map of WIRED memory under FreeBSD 9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 20:59:42 -0000 --k+G3HLlWI7eRTl+h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Jun-01 10:19:37 +0200, Wojciech Puchar wrote: >what tool and how can be used to display detailed map what exactly wired= =20 >memory on my system as it is far way too much (1.5GB out of 4GB RAM). The procfs "map" pseudo-file should give you this information on a per-process level. Unfortunately, the only documentation appears to be the source (sys/fs/procfs/procfs_map.c) --=20 Peter Jeremy --k+G3HLlWI7eRTl+h Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/Lz9QACgkQ/opHv/APuIfVIQCcD5VLfqr5mL+6l7IFEdl9oylX 13cAn1gkRRvktBmoYACgj15nYQyQ7Cuk =tVuF -----END PGP SIGNATURE----- --k+G3HLlWI7eRTl+h-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 01:42:14 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 43D66106564A for ; Mon, 4 Jun 2012 01:42:14 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id DE0DE8FC15 for ; Mon, 4 Jun 2012 01:42:13 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:subject:content-type; q=dns; s=sweb; b= hC5J+sjblUpRlFjH/9C3ihOKQyWEH3fivNBlnQGXy35V3VJ/BlA5YtslQSPU1ZNb 06xbEhDYO9s2Rcpj6gZ43WEBSlClhCXlOUz/MVhF8G2ShKLsldziVqHT1LTgpLIB ARQg+THGPFQ4hZ9KDZJ67Pz1xQzHxZvsp2ClqRlucnA= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:subject:content-type; s=sweb; bh=On2x fP2Q6M0+N+xlUDm1fCd3ux79wNMTSa0yayADqg0=; b=IfN6Jc2T7H1RFXffzR0x 6tExJ0rRXYDxHNpkblQhAdkPHBHsmzTH2+yx7f9MwD41ivua4ou97lBF+rmWMIl0 1V/11b+5d0ddLBxwxda3jXrESGcDQuiuD+szs0erfwefskjr5Fr6amhIZMorHWaL oTMRjt+MNxhgd++b9GtLcqY= Received: (qmail 74842 invoked from network); 3 Jun 2012 20:42:12 -0500 Received: from unknown (HELO ?10.10.1.87?) (bryan@shatow.net@10.10.1.87) by sweb.xzibition.com with ESMTPA; 3 Jun 2012 20:42:12 -0500 Message-ID: <4FCC126C.1020600@shatow.net> Date: Sun, 03 Jun 2012 20:42:04 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 1.4.1 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5FAF18043A57B2C0A76F8C09" Subject: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 01:42:14 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5FAF18043A57B2C0A76F8C09 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, I've written up a patch to add some privacy to last(1) while still giving non-privileged users access to their own login history. This is still a work in progress. I am reaching out to make sure my approach is proper and to get some input on code sharing. My goal is to add this support to w(1) and who(1) as well. FWIW I have been running a similar patch on my own shared-hosting systems (pre-utmpx) for a few year= s. Changes: * Added utmp group * All utmpx files are 660 root:utmp * last(1) runs setgid(utmp) and drops this as soon as the utmpx files are opened. * Users in the wheel or utmp group can see all entries * IFF security.bsd.see_other_uids=3D0: users only see their own entries, as well as shutdown/boot/init times. * If security.bsd.see_other_uids=3D1, all entries are always shown, as it= does now. Justifications: Why the changes? This makes sense for shared hosting environments where jails are not practical. A user should be able to see their own login history, to see if someone has been accessing their account, but not to see the IPs of other users. The intention is *not* to disallow them to see that other users of the system. Obviously they can just cat /etc/passwd. This is just about IP privacy. Why the setgid? Allow reading the entries, but disallow directly opening the utx files. I've seen some shared hosts incorrectly chmod 0 /usr/bin/last, but still leave the utmp files wide open for reading! Why the utmp group? It's consistent with other systems (OpenBSD, Linux), and allows giving a user access to see all entries, without granting them wheel or allowing a non-privileged user to run as setgid(wheel). It also helps mitigates security concerns by using a specific group only having extra privilege to utmpx files. I originally had not planned for security.bsd.see_other_uids, but considering POLA and consistency, it makes sense. Questions: To add this support to w(1) and who(1), I want to share the is_user_restricted() function among all 3 binaries. I don't think this really belongs in libc/libutil, but maybe it does. I could just add a shared file into usr.bin/last/ and link it in with all 3, but I don't really like this approach as then usr.bin/{w,who} would depend on usr.bin/last. The libc fchown() changes to pututxline.c may not be needed. I am open to removing this. On the other hand, perhaps most of my changes belong in utx functions in libc. Thus all utx readers would benefit and solve my sharing problem. The readers/clients would still need to be setgid(utmp) though to open the utx files. I still need to update the relevant man pages for these changes as well. Regards, Bryan Drewery Patch available at: http://www.shatow.net/freebsd/last-privacy.txt diff --git a/etc/group b/etc/group index 54d5c59..211ff32 100644 --- a/etc/group +++ b/etc/group @@ -17,6 +17,7 @@ sshd:*:22: smmsp:*:25: mailnull:*:26: guest:*:31: +utmp:*:45: bind:*:53: proxy:*:62: authpf:*:63: diff --git a/etc/newsyslog.conf b/etc/newsyslog.conf index 44aff12..1466939 100644 --- a/etc/newsyslog.conf +++ b/etc/newsyslog.conf @@ -34,6 +34,6 @@ /var/log/ppp.log root:network 640 3 100 * JC /var/log/security 600 10 100 * JC /var/log/sendmail.st 640 10 * 168 B -/var/log/utx.log 644 3 * @01T05 B +/var/log/utx.log root:utmp 660 3 * @01T05 B /var/log/weekly.log 640 5 1 $W6D0 JN /var/log/xferlog 600 7 100 * JC diff --git a/etc/rc.d/var b/etc/rc.d/var index 2b41219..7aa9063 100755 --- a/etc/rc.d/var +++ b/etc/rc.d/var @@ -101,9 +101,11 @@ esac # Make sure we have /var/log/utx.lastlogin and /var/log/utx.log files if [ ! -f /var/log/utx.lastlogin ]; then cp /dev/null /var/log/utx.lastlogin - chmod 644 /var/log/utx.lastlogin + chmod 660 /var/log/utx.lastlogin + chown root:utmp /var/log/utx.lastlogin fi if [ ! -f /var/log/utx.log ]; then cp /dev/null /var/log/utx.log - chmod 644 /var/log/utx.log + chmod 660 /var/log/utx.log + chown root:utmp /var/log/utx.log fi diff --git a/lib/libc/gen/pututxline.c b/lib/libc/gen/pututxline.c index 98addee..c1f7199 100644 --- a/lib/libc/gen/pututxline.c +++ b/lib/libc/gen/pututxline.c @@ -179,10 +179,13 @@ int fd; /* Initialize utx.active with a single BOOT_TIME record. */ - fd =3D _open(_PATH_UTX_ACTIVE, O_CREAT|O_RDWR|O_TRUNC, 0644); + fd =3D _open(_PATH_UTX_ACTIVE, O_CREAT|O_RDWR|O_TRUNC, 0660); if (fd < 0) return; - _write(fd, fu, sizeof(*fu)); + if (fchown(fd, 0, _UTMP_GID) < 0) + warnx("Unable to set root:utmp on " _PATH_UTX_ACTIVE); + else + _write(fd, fu, sizeof(*fu)); _close(fd); } @@ -269,13 +272,18 @@ vec[1].iov_len =3D l; l =3D htobe16(l); - fd =3D _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND, 0644); + fd =3D _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND, 0660); if (fd < 0) return (-1); - if (_writev(fd, vec, 2) =3D=3D -1) + if (fchown(fd, 0, _UTMP_GID) < 0) { + warnx("Unable to set root:utmp on " _PATH_UTX_LOG); error =3D errno; - else - error =3D 0; + } else { + if (_writev(fd, vec, 2) =3D=3D -1) + error =3D errno; + else + error =3D 0; + } _close(fd); errno =3D error; return (error =3D=3D 0 ? 0 : 1); diff --git a/lib/libc/gen/utxdb.h b/lib/libc/gen/utxdb.h index d9ebc93..25a5164 100644 --- a/lib/libc/gen/utxdb.h +++ b/lib/libc/gen/utxdb.h @@ -34,6 +34,7 @@ #define _PATH_UTX_ACTIVE "/var/run/utx.active" #define _PATH_UTX_LASTLOGIN "/var/log/utx.lastlogin" #define _PATH_UTX_LOG "/var/log/utx.log" +#define _UTMP_GID 45 /* * Entries in struct futx are ordered by how often they are used. In diff --git a/usr.bin/last/Makefile b/usr.bin/last/Makefile index fd63cd9..c18adbd 100644 --- a/usr.bin/last/Makefile +++ b/usr.bin/last/Makefile @@ -2,6 +2,8 @@ # $FreeBSD$ PROG=3D last +BINGRP=3D utmp +BINMODE=3D2555 NO_WFORMAT=3D diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c index e587def..025f948 100644 --- a/usr.bin/last/last.c +++ b/usr.bin/last/last.c @@ -57,6 +57,10 @@ #include #include #include +#include +#include +#include +#include #define NO 0 /* false/no */ #define YES 1 /* true/yes */ @@ -193,6 +197,42 @@ struct idtab { } /* + * Return whether or not the given user can see all entries or not + */ +static int +is_user_restricted(struct passwd *pw, int see_other_uids) +{ + int restricted =3D 1; /* Default to restricted access */ + gid_t *groups; + int ngroups, gid, cnt; + long ngroups_max; + struct group *group; + + if (geteuid() =3D=3D 0 || see_other_uids) + restricted =3D 0; + else { + /* Check if the user is in a privileged group */ + ngroups_max =3D sysconf(_SC_NGROUPS_MAX) + 1; + if ((groups =3D malloc(sizeof(gid_t) * (ngroups_max))) =3D=3D NULL) + err(1, "malloc"); + ngroups =3D ngroups_max; + (void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups); + for (cnt =3D 0; cnt < ngroups; ++cnt) { + gid =3D groups[cnt]; + group =3D getgrgid(gid); + /* User is in utmp or wheel group, they can see all */ + if (strncmp("utmp", group->gr_name, 4) =3D=3D 0 || strncmp("wheel", group->gr_name, 5) =3D=3D 0) { + restricted =3D 0; + break; + } + } + free(groups); + } + + return (restricted); +} + +/* * wtmp -- * read through the utx.log file */ @@ -205,6 +245,9 @@ struct idtab { time_t t; char ct[80]; struct tm *tm; + struct passwd *pw =3D NULL; + int restricted, see_other_uids; + size_t len; LIST_INIT(&idlist); (void)time(&t); @@ -212,7 +255,30 @@ struct idtab { /* Load the last entries from the file. */ if (setutxdb(UTXDB_LOG, file) !=3D 0) err(1, "%s", file); + + /* drop setgid now that the db is open */ + setgid(getgid()); + + /* Lookup current user information */ + pw =3D getpwuid(getuid()); + + len =3D sizeof(see_other_uids); + if (sysctlbyname("security.bsd.see_other_uids", &see_other_uids, &len, NULL, 0)) + see_other_uids =3D 0; + restricted =3D is_user_restricted(pw, see_other_uids); + while ((ut =3D getutxent()) !=3D NULL) { + /* Skip this entry if the invoking user is not permitted + * to see it */ + if (restricted && + !(ut->ut_type =3D=3D BOOT_TIME || + ut->ut_type =3D=3D SHUTDOWN_TIME || + ut->ut_type =3D=3D OLD_TIME || + ut->ut_type =3D=3D NEW_TIME || + ut->ut_type =3D=3D INIT_PROCESS) && + strncmp(ut->ut_user, pw->pw_name, sizeof(ut->ut_user))) + continue; + if (amount % 128 =3D=3D 0) { buf =3D realloc(buf, (amount + 128) * sizeof *ut); if (buf =3D=3D NULL) --------------enig5FAF18043A57B2C0A76F8C09 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJPzBJxAAoJEG54KsA8mwz5CbYP/iU9/srJSr0OHGhNaqfKJtqx SHB3KPVbchR/pwg5YgRYYIvVd1lPy2nd8KZHZOXqbK4H56B8QnMHyNMlk5RCZN/4 HC5AJGQ197m2ynSAwNOqE28qzhaxLWlz9JdRuZePYJuoaykYEPtMgXg2enNAuW0L ZOs0RSeNgMcuRv6TH1GxyXOmfZLMG9YumJHlvR6nGF60vkajwvRYsvRXsvbOmhYl EpVXSpvHKdhzdkwj7bJa4/Oj2zX0NqXO13vMMynGrdvfpwJa35m98B87Qo5iOABX XbrsmUnAptr0tic/3r7z1ipBnmPIbZbKrVG5AaiRKcnTmusoJ/ANFSZRORNN4Gwe dpwRCsm95cbbr4m+kq/x4xeIRXpbp/jOaWq17/76YQRof4o0MbAcK/Vz2UZNFTTW /NsWX7tEszwSRvtNt0DDdMtqRWpoi2sUXTFuynrm5Y/NB7Uy5YKfomjB6uIcrRak a7iHybd10evC+tnuLZ0HI/MF5yWn+779wpR1OR7Drx7tGUle25GD7Cz622GKgiNy kIk1LRlZdCxWOBWn0uox9XE78xjar3odfy062IkZkxMJ3MTWqjdDuv851LoMZMy9 PPk85dWYz7Wf7SO4X9gFNpChBAndkPx4X3sEuEBURHZD+wLALXVhK/dtszJ55ERu 0tICfWmWj+/H92RzTnnd =o2eb -----END PGP SIGNATURE----- --------------enig5FAF18043A57B2C0A76F8C09-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 02:13:27 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 54841106564A for ; Mon, 4 Jun 2012 02:13:27 +0000 (UTC) (envelope-from chrishutchinson1@yahoo.com) Received: from nm23.bullet.mail.sp2.yahoo.com (nm23.bullet.mail.sp2.yahoo.com [98.139.91.93]) by mx1.freebsd.org (Postfix) with SMTP id 0D51E8FC14 for ; Mon, 4 Jun 2012 02:13:27 +0000 (UTC) Received: from [98.139.91.69] by nm23.bullet.mail.sp2.yahoo.com with NNFMP; 04 Jun 2012 02:13:21 -0000 Received: from [208.71.42.206] by tm9.bullet.mail.sp2.yahoo.com with NNFMP; 04 Jun 2012 02:13:21 -0000 Received: from [127.0.0.1] by smtp217.mail.gq1.yahoo.com with NNFMP; 04 Jun 2012 02:13:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1338776001; bh=ke1H5z+3hCSFmXaUutRkfcbACFwjgCaMcxw5BKbCwvc=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Face:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=SLo9k0nJ0kVYM41myjcRaQMZg3wwFCumAhL03zQlv0YPXVXMjQiegVEK8yPSm+L1XsCCopjFb0oImbe8qm/8qPgMZoT6g5LWSY7HBJLP2T3CU2Ko43WwbNt9FA6zWCeUDXFKVG/JYpk3QX3iCdww621xawg1QG+qCMOtO80Wg0I= X-Yahoo-Newman-Id: 490705.9013.bm@smtp217.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: OLF5WqYVM1k5ns8TabliHVUdD7YcrI7k5pkj1cHzNvcKXJ9 5LizH1GMuG6Me.QRyOmfJ2sEp22bczJn5h0Hq3TGZiE92nFEcHRWBY955kIG W6DvUKfcTSZrHSySVxWgNNfrLi8ZiUw1hFSKhLT9joZuG2QnJFieY2CIWbJB uejaPjRq8ZGECIqndg9ppFeCaELpgh1wjVsc5aw9X3R.PdpIuAbY15.TMqw2 nq4X.j9ukKidn0wB3PVAQKH33AQKOKc2UqcLk9Rfyy.KdktQzmfFBuouh2jR LxF5DhpQU.bHrY6yUTIm.Y80LzFFNmtfskltgS1IYudgeeCGl3NzphldqPAM hva7UzUG68uskdgRBd0JGeZaiWBoD_xnjVA6VnN3G.4DQZeMgeK3seX0fhGo - X-Yahoo-SMTP: uW3vktqswBBwhzUUqSfIo9IQDlOyJjOVATmsCrk- Received: from udns.ultimateDNS.NET (chrishutchinson1@96.26.47.11 with login) by smtp217.mail.gq1.yahoo.com with SMTP; 03 Jun 2012 19:13:20 -0700 PDT Date: Sun, 3 Jun 2012 19:12:15 -0700 From: Chris To: freebsd-hackers@freebsd.org Message-ID: <20120603191215.6590eec3@udns.ultimateDNS.NET> In-Reply-To: <201205272051.00016.lobo@bsd.com.br> References: <4FC25A5F.4020401@rawbw.com> <20120527170142.GD1509@albert.catwhisker.org> <4FC25ECC.2060400@rawbw.com> <201205272051.00016.lobo@bsd.com.br> X-Face: $mXi*82up^b>]TbwAyL%A8i^<*; noU6K:r#25QhoV@u[FYZ}`:LJ.g6+'oVI^|LuV~\+3i"#++*|t74; --SZKI/!BFCopG(kR$}T=J6uPma-=qk5ZhU#S">\hUKl{g((V7*MGgn>T~_cFs-UQU4b+o7Jiv List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 02:13:27 -0000 On Sun, 27 May 2012 20:50:59 -0300 Mario Lobo wrote: > On Sunday 27 May 2012 14:05:16 Yuri wrote: > > On 05/27/2012 10:01, David Wolfskill wrote: > > > So, at least in my case, I respectfully disagree with the > > > assessment in the Subject. > > > > i386 is one difference (I use amd64) > > FX 770M is another difference (I use 9400GT) > > I also have everything updated with the similar portmaster command. > > > > Yuri > > I use 8-STABLE amd64 with 295.40/9800GT and been using it since I can > remember. Except for some quircks with early VirtualBox versions, I > have NEVER had a problem with ANY version of the driver I've used. > FWIW uname -a FreeBSD udns 8.3-STABLE FreeBSD 8.3-STABLE #2: Sun May 20 22:25:10 PDT 2012 root@udns:/usr/obj/usr/src/sys/AMD64 amd64 Xorg.0.log NVIDIA GPU GeForce 7800 GT (G70) PCI:*(0:1:0:0) 10de:0092:3842:c518 NVIDIA Corporation G70 [GeForce 7800 GT] rev 161 NVIDIA dlloader X Driver 295.40 Thu Apr 5 21:27:46 PDT 2012 Has always worked w/o any issues -- ever. From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 04:58:53 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A058106566C for ; Mon, 4 Jun 2012 04:58:53 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id CBA418FC1E for ; Mon, 4 Jun 2012 04:58:52 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q544wna3003731; Mon, 4 Jun 2012 06:58:49 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q544wnjO003728; Mon, 4 Jun 2012 06:58:49 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Mon, 4 Jun 2012 06:58:49 +0200 (CEST) From: Wojciech Puchar To: Peter Jeremy In-Reply-To: <20120603205756.GH2675@aspire.rulingia.com> Message-ID: References: <20120603205756.GH2675@aspire.rulingia.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Mon, 04 Jun 2012 06:58:50 +0200 (CEST) Cc: freebsd-hackers@freebsd.org Subject: Re: detailed map of WIRED memory under FreeBSD 9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 04:58:53 -0000 thank you On Mon, 4 Jun 2012, Peter Jeremy wrote: > On 2012-Jun-01 10:19:37 +0200, Wojciech Puchar wrote: >> what tool and how can be used to display detailed map what exactly wired >> memory on my system as it is far way too much (1.5GB out of 4GB RAM). > > The procfs "map" pseudo-file should give you this information on a > per-process level. Unfortunately, the only documentation appears to > be the source (sys/fs/procfs/procfs_map.c) > > -- > Peter Jeremy > From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 05:00:09 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82BB61065674 for ; Mon, 4 Jun 2012 05:00:09 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id B41768FC12 for ; Mon, 4 Jun 2012 05:00:08 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q54501EM003751; Mon, 4 Jun 2012 07:00:01 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q54501Or003748; Mon, 4 Jun 2012 07:00:01 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Mon, 4 Jun 2012 07:00:01 +0200 (CEST) From: Wojciech Puchar To: Hans Petter Selasky In-Reply-To: <201206031113.46034.hselasky@c2i.net> Message-ID: References: <201206031113.46034.hselasky@c2i.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Mon, 04 Jun 2012 07:00:01 +0200 (CEST) Cc: freebsd-hackers@freebsd.org Subject: Re: reverse USB driver - is it possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 05:00:09 -0000 > > Have a look at: > > sys/dev/usb/storage/ustorage_fs.c > > Currently just implements a RAM disk. Patches are welcome. many answers - contradicting itself. others says hardware is unable to do so, you say it is done. then - how to use it? any docs? :) From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 07:48:19 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BA52106564A for ; Mon, 4 Jun 2012 07:48:19 +0000 (UTC) (envelope-from slobodyanyuk.sergey@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 19DC28FC12 for ; Mon, 4 Jun 2012 07:48:18 +0000 (UTC) Received: by eaac13 with SMTP id c13so786284eaa.13 for ; Mon, 04 Jun 2012 00:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=N9tNAhM+v3wG52r8P5uLbBJXeg7Dufq6PC/ZMdtQM1s=; b=qB8nDFpJD6sSmldR+kdEj6aVa0Au+EsodzhLKdyDgHuVeIw8GuHZa1+gCurXT8Pgae Drb17tjYNOb/S516Qxx9n2M4ATdUGiXVKCtdKmJcRMAk/1tBJOANAOb9//1kUW/mWkDm G4y1yF/W5pX2Yn3YXMkEndiCyW9hvAY3tBgjoF6VChvNfv9629rSb1V7fe5HWNMDdoY1 hVoeLfgR4x10T3wOvNfBxBGJYcjOEeZ220MGeIAcJ9qsQ0JWpXZLasIxdi2c5NjmGI+M 6Tk26EKl+hMOiD7AYYeoojQTD+8NMgaHPnqly/7+paTK3mPhk5YfQ7g/pyZem6Qcm+sh 3soA== MIME-Version: 1.0 Received: by 10.14.127.138 with SMTP id d10mr4536406eei.171.1338796097894; Mon, 04 Jun 2012 00:48:17 -0700 (PDT) Sender: slobodyanyuk.sergey@gmail.com Received: by 10.14.37.12 with HTTP; Mon, 4 Jun 2012 00:48:17 -0700 (PDT) Date: Mon, 4 Jun 2012 10:48:17 +0300 X-Google-Sender-Auth: mqADYckHtMuVyaipxUFliQ3oO6g Message-ID: From: Sergey Slobodyanyuk To: killing@multiplay.co.uk Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re:dtrace filename lookups from fd (Serg Slobodyanyuk) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 07:48:19 -0000 > > > Date: Fri, 1 Jun 2012 17:00:20 +0100 > From: "Steven Hartland" > > As a first foray into dtrace I wanted to create a little > script which shows the amount of disk read / write activity. > > Now the DtraceToolkit includes rwsnoop but this uses Solaris > specific requests and on looking around it seems like > using rwsnoop vn_fullpath may be the way to go. > > Has anyone done anything similar to this before or has any > tips on going about this? > > Regards > Steve > HI, Some times ago I decided to do the same - port rwsnoop to FreeBSD(8.2 R). FreeBSD vfs code quiet different from solaris code so I asked for help Kostik and he directed me to vn_fullpath() routine after that I wrote working port of rwsnoop. But script generate alot of errors like "invalid address (0x....) in action" even on data that should be there(from my point of view). After several tries to debug it I left it as is. You can run it with "| grep -v invalid" or direct STDERR to /dev/null. Maybe Hackers could look at it and say what's wrong :-) Changed part of code: this->fp = &(curthread->td_proc->p_fd->fd_ofiles[self->fd]); this->vp = (struct vnode *)((*(this->fp))->f_vnode); this->cache_dst = &((this->vp)->v_cache_dst); this->ncp = (&((this->vp)->v_cache_dst)) != NULL ? (&((this->vp)->v_cache_dst))->tqh_first : 0; self->ncname = this->ncp ? (this->ncp->nc_name != 0 ? stringof(this->ncp->nc_name) : "") : "" Link to script: https://docs.google.com/open?id=0B7olr28SbDyNZktLMG51UHVxNW8 //Br. Serg From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 08:20:31 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 867A81065675 for ; Mon, 4 Jun 2012 08:20:31 +0000 (UTC) (envelope-from ken@mthelicon.com) Received: from hercules.mthelicon.com (hercules.mthelicon.com [66.90.118.40]) by mx1.freebsd.org (Postfix) with ESMTP id 51B6C8FC15 for ; Mon, 4 Jun 2012 08:20:31 +0000 (UTC) Received: from feathers.peganest.com (176-227-140-205.ip.skylogicnet.com [176.227.140.205]) (authenticated bits=0) by hercules.mthelicon.com (8.14.5/8.14.5) with ESMTP id q547stbn091157 (version=TLSv1/SSLv3 cipher=DHE-DSS-CAMELLIA256-SHA bits=256 verify=NO); Mon, 4 Jun 2012 07:55:02 GMT (envelope-from ken@mthelicon.com) Message-ID: <4FCC69CD.7010109@mthelicon.com> Date: Mon, 04 Jun 2012 08:54:53 +0100 From: Pegasus Mc Cleaft User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120602 Thunderbird/12.0.1 MIME-Version: 1.0 To: Chris References: <4FC25A5F.4020401@rawbw.com> <20120527170142.GD1509@albert.catwhisker.org> <4FC25ECC.2060400@rawbw.com> <201205272051.00016.lobo@bsd.com.br> <20120603191215.6590eec3@udns.ultimateDNS.NET> In-Reply-To: <20120603191215.6590eec3@udns.ultimateDNS.NET> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: nvidia-driver-295.49 is highly unstable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 08:20:31 -0000 On 06/04/12 03:12, Chris wrote: > On Sun, 27 May 2012 20:50:59 -0300 > Mario Lobo wrote: > >> On Sunday 27 May 2012 14:05:16 Yuri wrote: >>> On 05/27/2012 10:01, David Wolfskill wrote: >>>> So, at least in my case, I respectfully disagree with the >>>> assessment in the Subject. >>> i386 is one difference (I use amd64) >>> FX 770M is another difference (I use 9400GT) >>> I also have everything updated with the similar portmaster command. >>> >>> Yuri >> I use 8-STABLE amd64 with 295.40/9800GT and been using it since I can >> remember. Except for some quircks with early VirtualBox versions, I >> have NEVER had a problem with ANY version of the driver I've used. >> > FWIW > > uname -a > FreeBSD udns 8.3-STABLE FreeBSD 8.3-STABLE #2: Sun May 20 22:25:10 PDT 2012 > root@udns:/usr/obj/usr/src/sys/AMD64 amd64 > > Xorg.0.log > NVIDIA GPU GeForce 7800 GT (G70) > PCI:*(0:1:0:0) 10de:0092:3842:c518 NVIDIA Corporation G70 [GeForce 7800 GT] rev 161 > NVIDIA dlloader X Driver 295.40 Thu Apr 5 21:27:46 PDT 2012 > > Has always worked w/o any issues -- ever. > > Hi Everyone, You know what it could be? I just had to rebuild my user-land because of KDE updates and I use variables in my make.conf to switch between base GCC and CLANG. I forgot to switch back to base gcc before compiling the nvidia driver. I installed the driver and rebooted, xorg came up but as soon as I logged in, kwin crashed, then the machine kernel panicked and rebooted. I rebooted and crashed a few more times before realizing what I had done. I recompiled the driver with GCC and the machine has been rock-stable with the nvidia driver. Maybe the OP has done the same thing and not realized it? Ta Peg From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 09:11:56 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 46B37106566B for ; Mon, 4 Jun 2012 09:11:56 +0000 (UTC) (envelope-from e.durso@live.com) Received: from dub0-omc2-s7.dub0.hotmail.com (dub0-omc2-s7.dub0.hotmail.com [157.55.1.146]) by mx1.freebsd.org (Postfix) with ESMTP id CE68B8FC12 for ; Mon, 4 Jun 2012 09:11:55 +0000 (UTC) Received: from DUB116-W108 ([157.55.1.138]) by dub0-omc2-s7.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 4 Jun 2012 02:10:47 -0700 Message-ID: X-Originating-IP: [2.231.157.89] From: enrico d'urso To: Date: Mon, 4 Jun 2012 11:10:47 +0200 Importance: Normal In-Reply-To: <12212.1338663660@critter.freebsd.dk> References: Your message of "Sat, 02 Jun 2012 20:14:34 +0200." X-OriginalArrivalTime: 04 Jun 2012 09:10:47.0537 (UTC) FILETIME=[EDE0B610:01CD4231] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: RE: [Hash function Ipv4] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 09:11:56 -0000 Hi=2C I did some tests with some subnets Ip /24 and I will share the results. I got very good results with this configuration: Hash table's size:=20 Let x be the number of ip. Y =3D x*2=2C then=20 size_table =3D 'The power of 2 closest to Y=2C and greater than or equal to= Y'. Hash Function:=20 return Ip_in_network_byte_order % size_table=3B Collision's case: In this case i have used research quadratic: ((unsigned int)( hash_function + 0.5*k + 0.5*k*k )) % size_table =3B ---------------------------------- on the other hand When I have used Random Ip=2C that does not belong to the same subnet ip: unsigned int HASH =3D 2039=3B uint32_t h=3B=20 h =3D key % HASH=3B key /=3D HASH=3B h ^=3D key % HASH=3B h ^=3D key / HASH=3B=20 Suggested to me by Poul-Henning Kamp (thanks) works much better. That's all. Bye Enrico=20 = From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 09:44:13 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A27561065676 for ; Mon, 4 Jun 2012 09:44:13 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id ED5248FC0A for ; Mon, 4 Jun 2012 09:44:12 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 264EE9B5; Mon, 4 Jun 2012 11:44:05 +0200 (CEST) Date: Mon, 4 Jun 2012 11:42:15 +0200 From: Pawel Jakub Dawidek To: Bryan Drewery Message-ID: <20120604094214.GC1387@garage.freebsd.pl> References: <4FCC126C.1020600@shatow.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <4FCC126C.1020600@shatow.net> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org Subject: Re: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 09:44:13 -0000 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 03, 2012 at 08:42:04PM -0500, Bryan Drewery wrote: > Hi, >=20 > I've written up a patch to add some privacy to last(1) while still > giving non-privileged users access to their own login history. >=20 > This is still a work in progress. I am reaching out to make sure my > approach is proper and to get some input on code sharing. My goal is to > add this support to w(1) and who(1) as well. FWIW I have been running a > similar patch on my own shared-hosting systems (pre-utmpx) for a few year= s. >=20 > Changes: >=20 > * Added utmp group > * All utmpx files are 660 root:utmp > * last(1) runs setgid(utmp) and drops this as soon as the utmpx files > are opened. > * Users in the wheel or utmp group can see all entries > * IFF security.bsd.see_other_uids=3D0: users only see their own entries, > as well as shutdown/boot/init times. > * If security.bsd.see_other_uids=3D1, all entries are always shown, as it > does now. >=20 > Justifications: >=20 > Why the changes? This makes sense for shared hosting environments where > jails are not practical. A user should be able to see their own login > history, to see if someone has been accessing their account, but not to > see the IPs of other users. The intention is *not* to disallow them to > see that other users of the system. Obviously they can just cat > /etc/passwd. This is just about IP privacy. >=20 > Why the setgid? Allow reading the entries, but disallow directly opening > the utx files. I've seen some shared hosts incorrectly chmod 0 > /usr/bin/last, but still leave the utmp files wide open for reading! >=20 > Why the utmp group? It's consistent with other systems (OpenBSD, Linux), > and allows giving a user access to see all entries, without granting > them wheel or allowing a non-privileged user to run as setgid(wheel). It > also helps mitigates security concerns by using a specific group only > having extra privilege to utmpx files. >=20 > I originally had not planned for security.bsd.see_other_uids, but > considering POLA and consistency, it makes sense. I think the proposed change does make sense. > Questions: >=20 > To add this support to w(1) and who(1), I want to share the > is_user_restricted() function among all 3 binaries. I don't think this > really belongs in libc/libutil, but maybe it does. I could just add a > shared file into usr.bin/last/ and link it in with all 3, but I don't > really like this approach as then usr.bin/{w,who} would depend on > usr.bin/last. A library is definiately a better place, although then I wouldn't pass see_other_uids as an argument, but obtain it within the function itself. Some comments to the code below. > -/var/log/utx.log 644 3 * @01T05 B > +/var/log/utx.log root:utmp 660 3 * @01T05 B Why does the utmp group has to have write access to this file. If I understand correctly it just reads from it, no? > --- a/lib/libc/gen/pututxline.c > +++ b/lib/libc/gen/pututxline.c > @@ -179,10 +179,13 @@ > int fd; >=20 > /* Initialize utx.active with a single BOOT_TIME record. */ > - fd =3D _open(_PATH_UTX_ACTIVE, O_CREAT|O_RDWR|O_TRUNC, 0644); > + fd =3D _open(_PATH_UTX_ACTIVE, O_CREAT|O_RDWR|O_TRUNC, 0660); > if (fd < 0) > return; > - _write(fd, fu, sizeof(*fu)); > + if (fchown(fd, 0, _UTMP_GID) < 0) > + warnx("Unable to set root:utmp on " _PATH_UTX_ACTIVE); > + else > + _write(fd, fu, sizeof(*fu)); > _close(fd); > } fchown() doesn't hurt here, I guess, but I would use UID_ROOT instead of 0. Doing explicit fchmod(2) might make sense too, as umask might cut some of the requested permissions. > @@ -269,13 +272,18 @@ > vec[1].iov_len =3D l; > l =3D htobe16(l); >=20 > - fd =3D _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND, 0644); > + fd =3D _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND, 0660); > if (fd < 0) > return (-1); > - if (_writev(fd, vec, 2) =3D=3D -1) > + if (fchown(fd, 0, _UTMP_GID) < 0) { > + warnx("Unable to set root:utmp on " _PATH_UTX_LOG); > error =3D errno; > - else > - error =3D 0; > + } else { > + if (_writev(fd, vec, 2) =3D=3D -1) > + error =3D errno; > + else > + error =3D 0; > + } > _close(fd); > errno =3D error; > return (error =3D=3D 0 ? 0 : 1); This looks very familiar to the above. Maybe we can get rid of this code duplication? > /* > + * Return whether or not the given user can see all entries or not > + */ > +static int > +is_user_restricted(struct passwd *pw, int see_other_uids) > +{ > + int restricted =3D 1; /* Default to restricted access */ > + gid_t *groups; > + int ngroups, gid, cnt; > + long ngroups_max; > + struct group *group; > + > + if (geteuid() =3D=3D 0 || see_other_uids) > + restricted =3D 0; > + else { > + /* Check if the user is in a privileged group */ > + ngroups_max =3D sysconf(_SC_NGROUPS_MAX) + 1; sysconf(3) can fail, at least in theory, so maybe: ngroups_max =3D sysconf(_SC_NGROUPS_MAX); if (ngroups_max =3D=3D -1) ngroups_max =3D NGROUPS_MAX; ngroups_max++; > + if ((groups =3D malloc(sizeof(gid_t) * (ngroups_max))) =3D=3D NULL) > + err(1, "malloc"); When this goes into library you has to return an error here. > + ngroups =3D ngroups_max; > + (void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups); You know that getgrouplist(3) returns groups from the system files and not actuall process groups? Was that intended? IMHO you should use getgroups(2) here. And again you ignore return value. > + for (cnt =3D 0; cnt < ngroups; ++cnt) { > + gid =3D groups[cnt]; > + group =3D getgrgid(gid); > + /* User is in utmp or wheel group, they can see all */ > + if (strncmp("utmp", group->gr_name, 4) =3D=3D 0 || strncmp("wheel", > group->gr_name, 5) =3D=3D 0) { strncmp(3) is bad idea here. If the user is a member of utmpfoo group or wheelx group you turn off restrictions. I'd really use getgroups(2) and look for GID_WHEEL or _UTMP_GID. > @@ -212,7 +255,30 @@ struct idtab { > /* Load the last entries from the file. */ > if (setutxdb(UTXDB_LOG, file) !=3D 0) > err(1, "%s", file); > + > + /* drop setgid now that the db is open */ Style: Sentence should start with capital letter and end with a period. > + setgid(getgid()); And if setgid(2) fails? > + /* Lookup current user information */ Style: Sentence should end with a period. > + pw =3D getpwuid(getuid()); And if getpwuid(3) fails? > + len =3D sizeof(see_other_uids); > + if (sysctlbyname("security.bsd.see_other_uids", &see_other_uids, &len, > NULL, 0)) sysctlbyname(3) doesn't return bool. > + see_other_uids =3D 0; > + restricted =3D is_user_restricted(pw, see_other_uids); > + > while ((ut =3D getutxent()) !=3D NULL) { > + /* Skip this entry if the invoking user is not permitted > + * to see it */ > + if (restricted && > + !(ut->ut_type =3D=3D BOOT_TIME || > + ut->ut_type =3D=3D SHUTDOWN_TIME || > + ut->ut_type =3D=3D OLD_TIME || > + ut->ut_type =3D=3D NEW_TIME || > + ut->ut_type =3D=3D INIT_PROCESS) && > + strncmp(ut->ut_user, pw->pw_name, sizeof(ut->ut_user))) That's one complex if. And again strncmp(3) used instead of strcmp(3). Also strncmp(3) doesn't return bool. If getpwuid(3) failed earlier you have NULL pointer dereference here. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/MgvYACgkQForvXbEpPzSTawCgolAOwuol9MCBa0tiZS9ztvUE VOYAoKpuzfWT8KizhPJGRbtHVAo+ybgd =OBCt -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 12:56:14 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E42751065673 for ; Mon, 4 Jun 2012 12:56:14 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 77ED78FC14 for ; Mon, 4 Jun 2012 12:56:14 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type; q=dns; s=sweb; b=hANS7YbIdNmh+boOpw6LEh/CsEUDNmMs r6yNPlzdZMJ9a/1Im9RxIFPEb/iFre4kfthhmbiCgPOH+1k/3Vw6TbI6sDVqm2HY rLDxNw1nXxt2nDuJ7BdsjMsARWIhhJtJxHo7QGSVDK5dMrRoEJgj6L9FUgM0iU2q Ez5fFCz/G/8= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type; s=sweb; bh=CzpfRhR9nRBYO3SvmkRLFyn5fTIByCyBZgnTw6 77vCM=; b=18PU+yQY4uhaE57N9ZqoMAfeZrCqSgr/9rTCr5KpyUnQyNLnj04+sz QSisgPUnyK3U+8bYLIMnmHlySdkeRKTFNO7aLj4wD9a/6WL4ZmyFAxrCP4f+6xKE N4cmIjAZ6rAloRwvmYpcOMkgqbmLrdf4oFE4Sdq79IXvs7u0rUEX4= Received: (qmail 72521 invoked from network); 4 Jun 2012 07:56:12 -0500 Received: from unknown (HELO ?10.10.1.87?) (bryan@shatow.net@10.10.1.87) by sweb.xzibition.com with ESMTPA; 4 Jun 2012 07:56:12 -0500 Message-ID: <4FCCB069.90808@shatow.net> Date: Mon, 04 Jun 2012 07:56:09 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <4FCC126C.1020600@shatow.net> <20120604094214.GC1387@garage.freebsd.pl> In-Reply-To: <20120604094214.GC1387@garage.freebsd.pl> X-Enigmail-Version: 1.4.1 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig83EF10B1304347AE9444FAB5" Cc: freebsd-hackers@freebsd.org Subject: Re: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 12:56:15 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig83EF10B1304347AE9444FAB5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 6/4/2012 4:42 AM, Pawel Jakub Dawidek wrote: > On Sun, Jun 03, 2012 at 08:42:04PM -0500, Bryan Drewery wrote: >> Questions: >> >> To add this support to w(1) and who(1), I want to share the >> is_user_restricted() function among all 3 binaries. I don't think this= >> really belongs in libc/libutil, but maybe it does. I could just add a >> shared file into usr.bin/last/ and link it in with all 3, but I don't >> really like this approach as then usr.bin/{w,who} would depend on >> usr.bin/last. >=20 > A library is definiately a better place, although then I wouldn't pass > see_other_uids as an argument, but obtain it within the function itself= =2E Pawel, Thank you for the input. I will cleanup your findings and experiment with moving it into the libra= ry. More comments below. >=20 > Some comments to the code below. >=20 >> -/var/log/utx.log 644 3 * @01T05 B >> +/var/log/utx.log root:utmp 660 3 * @01T05 B >=20 > Why does the utmp group has to have write access to this file. > If I understand correctly it just reads from it, no? I suppose I did this from experience and other custom changes. It does make sense to limit it to root writing, but then apps like screen can not write to it if not setuid root. That's outside the scope of this change though and potentially wrong, so I will make this 640 for now. >=20 >> --- a/lib/libc/gen/pututxline.c >> +++ b/lib/libc/gen/pututxline.c >> @@ -179,10 +179,13 @@ >> int fd; >> >> /* Initialize utx.active with a single BOOT_TIME record. */ >> - fd =3D _open(_PATH_UTX_ACTIVE, O_CREAT|O_RDWR|O_TRUNC, 0644); >> + fd =3D _open(_PATH_UTX_ACTIVE, O_CREAT|O_RDWR|O_TRUNC, 0660); >> if (fd < 0) >> return; >> - _write(fd, fu, sizeof(*fu)); >> + if (fchown(fd, 0, _UTMP_GID) < 0) >> + warnx("Unable to set root:utmp on " _PATH_UTX_ACTIVE); >> + else >> + _write(fd, fu, sizeof(*fu)); >> _close(fd); >> } >=20 > fchown() doesn't hurt here, I guess, but I would use UID_ROOT instead o= f 0. > Doing explicit fchmod(2) might make sense too, as umask might cut some > of the requested permissions. >=20 >> @@ -269,13 +272,18 @@ >> vec[1].iov_len =3D l; >> l =3D htobe16(l); >> >> - fd =3D _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND, 0644); >> + fd =3D _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND, 0660); >> if (fd < 0) >> return (-1); >> - if (_writev(fd, vec, 2) =3D=3D -1) >> + if (fchown(fd, 0, _UTMP_GID) < 0) { >> + warnx("Unable to set root:utmp on " _PATH_UTX_LOG); >> error =3D errno; >> - else >> - error =3D 0; >> + } else { >> + if (_writev(fd, vec, 2) =3D=3D -1) >> + error =3D errno; >> + else >> + error =3D 0; >> + } >> _close(fd); >> errno =3D error; >> return (error =3D=3D 0 ? 0 : 1); >=20 > This looks very familiar to the above. Maybe we can get rid of this cod= e > duplication? >=20 >> /* >> + * Return whether or not the given user can see all entries or not >> + */ >> +static int >> +is_user_restricted(struct passwd *pw, int see_other_uids) >> +{ >> + int restricted =3D 1; /* Default to restricted access */ >> + gid_t *groups; >> + int ngroups, gid, cnt; >> + long ngroups_max; >> + struct group *group; >> + >> + if (geteuid() =3D=3D 0 || see_other_uids) >> + restricted =3D 0; >> + else { >> + /* Check if the user is in a privileged group */ >> + ngroups_max =3D sysconf(_SC_NGROUPS_MAX) + 1; >=20 > sysconf(3) can fail, at least in theory, so maybe: >=20 > ngroups_max =3D sysconf(_SC_NGROUPS_MAX); > if (ngroups_max =3D=3D -1) > ngroups_max =3D NGROUPS_MAX; > ngroups_max++; >=20 >> + if ((groups =3D malloc(sizeof(gid_t) * (ngroups_max))) =3D=3D NULL)= >> + err(1, "malloc"); >=20 > When this goes into library you has to return an error here. >=20 >> + ngroups =3D ngroups_max; >> + (void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups); >=20 > You know that getgrouplist(3) returns groups from the system files and > not actuall process groups? Was that intended? IMHO you should use > getgroups(2) here. And again you ignore return value. Most of this section was copied from usr.bin/id/id.c I will review both and take your findings into consideration. >=20 >> + for (cnt =3D 0; cnt < ngroups; ++cnt) { >> + gid =3D groups[cnt]; >> + group =3D getgrgid(gid); >> + /* User is in utmp or wheel group, they can see all */ >> + if (strncmp("utmp", group->gr_name, 4) =3D=3D 0 || strncmp("wheel"= , >> group->gr_name, 5) =3D=3D 0) { >=20 > strncmp(3) is bad idea here. If the user is a member of utmpfoo group o= r > wheelx group you turn off restrictions. Woops! >=20 > I'd really use getgroups(2) and look for GID_WHEEL or _UTMP_GID. >=20 >> @@ -212,7 +255,30 @@ struct idtab { >> /* Load the last entries from the file. */ >> if (setutxdb(UTXDB_LOG, file) !=3D 0) >> err(1, "%s", file); >> + >> + /* drop setgid now that the db is open */ >=20 > Style: Sentence should start with capital letter and end with a period.= >=20 >> + setgid(getgid()); >=20 > And if setgid(2) fails? >=20 >> + /* Lookup current user information */ >=20 > Style: Sentence should end with a period. >=20 >> + pw =3D getpwuid(getuid()); >=20 > And if getpwuid(3) fails? >=20 >> + len =3D sizeof(see_other_uids); >> + if (sysctlbyname("security.bsd.see_other_uids", &see_other_uids, &le= n, >> NULL, 0)) >=20 > sysctlbyname(3) doesn't return bool. >=20 >> + see_other_uids =3D 0; >> + restricted =3D is_user_restricted(pw, see_other_uids); >> + >> while ((ut =3D getutxent()) !=3D NULL) { >> + /* Skip this entry if the invoking user is not permitted >> + * to see it */ >> + if (restricted && >> + !(ut->ut_type =3D=3D BOOT_TIME || >> + ut->ut_type =3D=3D SHUTDOWN_TIME || >> + ut->ut_type =3D=3D OLD_TIME || >> + ut->ut_type =3D=3D NEW_TIME || >> + ut->ut_type =3D=3D INIT_PROCESS) && >> + strncmp(ut->ut_user, pw->pw_name, sizeof(ut->ut_user))) >=20 > That's one complex if. And again strncmp(3) used instead of strcmp(3). > Also strncmp(3) doesn't return bool. If getpwuid(3) failed earlier you > have NULL pointer dereference here. >=20 As for the "bool" checks, I was checking for non-zero, but I will make it explicit. Regards, Bryan Drewery --------------enig83EF10B1304347AE9444FAB5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJPzLBpAAoJEG54KsA8mwz5bXIP/1v/vj5QhDntm5otqv/rhzO6 Ea0CECOvFS8rM6suyNzgdo3J1XPVSJE1l9DSAFBxFmN1CTReOJkHes0kx9OkPREh 2V9xCtkxxvNWSVrSvXJu1Utxst8DS1KiZFH055f4Kf4DElP11EfBdrAyAEDIzkyF Ns9J8gvr6J17b0yqfxYVl5zbwHO/QOm5xy4XisnbKsgsJNtUPck6IYflEwYLJi+7 UKyZIvc77xS9tnJVv81OIoc33kLdJrJQesARkxHBTd4/USmKuhhoR3kyzTDhA18l ewzIpYVrlu6/t2hr9LyORmgekbJxLS0ZLNt3kU7sndv+p1rEdUlBNXtX9QtB89fw sMj3aL8SfVuNUmqT8e9DtkrCQvQ+RIsJnu2XQiLjmhpOLUiPYRG/VKt7qOencK/Y 1YI89MJruE5t7zpWmAvHpWiZUeJgsE/kWOIhm/+UAlceo0EXSDUCGsn3bZeBIubo 23VXlzIupPl/NGmhFX/bkIwBHTGyY45XvbuwZxzJQr73exYj6ijvrOro15Hh2yxX 4d8X/S7wzQ5JFUj6NS5YQbdGTZoUjW1y6X6u7x+uYDCJT5Fd/NHUlrZ6qhbK8ewm bifjO3/lNACMZfDgvQMK4cEve3soNVaDYEoJOpu6zQLgKuYhpXR/FhL0CXcZcb1x Jdm1oU4Cg793420UhBTq =3EyX -----END PGP SIGNATURE----- --------------enig83EF10B1304347AE9444FAB5-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 13:18:01 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4F811065670 for ; Mon, 4 Jun 2012 13:18:01 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 254BB8FC15 for ; Mon, 4 Jun 2012 13:18:00 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sweb; b=XLWecp YlxSZRiL/CDZeBIZ1jt2WUXRn2Mht6YCycmS/VVRDjiKfzqph8CPkvd8641Kf4aL COsTFvLUhVipPw/KqoI/3AOea5aIw4CKANc6j17PzIgKWsKSPkOQ1wcJ+0d/FCoh wRCkiXJKQ9VhZ/1yossbbm0RtzfzWfcubocG4= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sweb; bh=3ej0YcYr+BIF WnwlzZCVlBmuKCc8GsixGpFuvGnYnEI=; b=w12EEEjXtH81yokQdlx6tYro2TwA 57PXuXijIRA99YK5M4+0s9nsOmGwXUp17dvgn5IXqlCt67VFEofr55r3fb5+ui+l UbGtcsFQYu2HvWmM1QCmZl45VjmDhThYC1wUkZqqJ5isvw5IOr5gHLbt6mfy/ovU dNQwnssiN1q4EVQ= Received: (qmail 83846 invoked from network); 4 Jun 2012 08:17:59 -0500 Received: from unknown (HELO ?10.10.1.87?) (bryan@shatow.net@10.10.1.87) by sweb.xzibition.com with ESMTPA; 4 Jun 2012 08:17:59 -0500 Message-ID: <4FCCB584.4050808@shatow.net> Date: Mon, 04 Jun 2012 08:17:56 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <4FCC126C.1020600@shatow.net> <20120604094214.GC1387@garage.freebsd.pl> In-Reply-To: <20120604094214.GC1387@garage.freebsd.pl> X-Enigmail-Version: 1.4.1 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 13:18:01 -0000 On 6/4/2012 4:42 AM, Pawel Jakub Dawidek wrote: > A library is definiately a better place, although then I wouldn't pass > see_other_uids as an argument, but obtain it within the function itself. Does libc make sense for this? I'm thinking yes since it's where the utx functions live. In particular this change seems to make sense in getutxent(3). Though I do not want to violate POSIX... The endutxent(), getutxent(), getutxid(), getutxline() and setutxent() functions are expected to conform to IEEE Std 1003.1-2008 (``POSIX.1''). Bryan From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 13:53:29 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A95491065679 for ; Mon, 4 Jun 2012 13:53:29 +0000 (UTC) (envelope-from rflynn@acsalaska.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 752BB8FC1C for ; Mon, 4 Jun 2012 13:53:29 +0000 (UTC) Received: from [127.0.0.1] (squeeze.lan.rachie.is-a-geek.net [192.168.2.30]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 01B087E858 for ; Mon, 4 Jun 2012 05:53:27 -0800 (AKDT) Message-ID: <4FCCBDD6.5020800@acsalaska.net> Date: Mon, 04 Jun 2012 15:53:26 +0200 From: Mel Flynn User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4FC25A5F.4020401@rawbw.com> <20120527170142.GD1509@albert.catwhisker.org> <4FC25ECC.2060400@rawbw.com> <201205272051.00016.lobo@bsd.com.br> <20120603191215.6590eec3@udns.ultimateDNS.NET> <4FCC69CD.7010109@mthelicon.com> In-Reply-To: <4FCC69CD.7010109@mthelicon.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: nvidia-driver-295.49 is highly unstable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 13:53:29 -0000 On 4-6-2012 9:54, Pegasus Mc Cleaft wrote: > I forgot to switch back to base gcc before > compiling the nvidia driver. I installed the driver and rebooted, xorg > came up but as soon as I logged in, kwin crashed, then the machine > kernel panicked and rebooted. I rebooted and crashed a few more times > before realizing what I had done. I recompiled the driver with GCC and > the machine has been rock-stable with the nvidia driver. > > Maybe the OP has done the same thing and not realized it? That would account for what I'm seeing too and I know I've compiled nvidia-driver with clang. Except in my case it's Xfce4 and no panics, but completely unusable (fonts were too large, offsets calculated wrongly, terminal emulation was like opening something in vi with TERM=dumb, mouse movement shocked, machine under constant load). -- Mel From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 14:15:52 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC3491065691 for ; Mon, 4 Jun 2012 14:15:52 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (m209-73.dsl.rawbw.com [198.144.209.73]) by mx1.freebsd.org (Postfix) with ESMTP id BD81E8FC08 for ; Mon, 4 Jun 2012 14:15:52 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.5/8.14.5) with ESMTP id q54EFqPn040873 for ; Mon, 4 Jun 2012 07:15:52 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.5/8.14.5/Submit) id q54EFq0b040872 for freebsd-hackers@freebsd.org; Mon, 4 Jun 2012 07:15:52 -0700 (PDT) (envelope-from david) Date: Mon, 4 Jun 2012 07:15:52 -0700 From: David Wolfskill Cc: freebsd-hackers@freebsd.org Message-ID: <20120604141552.GK1492@albert.catwhisker.org> References: <4FC25A5F.4020401@rawbw.com> <20120527170142.GD1509@albert.catwhisker.org> <4FC25ECC.2060400@rawbw.com> <201205272051.00016.lobo@bsd.com.br> <20120603191215.6590eec3@udns.ultimateDNS.NET> <4FCC69CD.7010109@mthelicon.com> <4FCCBDD6.5020800@acsalaska.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OX2aLCKeO1apYW07" Content-Disposition: inline In-Reply-To: <4FCCBDD6.5020800@acsalaska.net> User-Agent: Mutt/1.4.2.3i Subject: Re: nvidia-driver-295.49 is highly unstable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 14:15:53 -0000 --OX2aLCKeO1apYW07 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 04, 2012 at 03:53:26PM +0200, Mel Flynn wrote: > On 4-6-2012 9:54, Pegasus Mc Cleaft wrote: >=20 > > I forgot to switch back to base gcc before > > compiling the nvidia driver. I installed the driver and rebooted, xorg > > came up but as soon as I logged in, kwin crashed, then the machine > > kernel panicked and rebooted. I rebooted and crashed a few more times > > before realizing what I had done. I recompiled the driver with GCC and > > the machine has been rock-stable with the nvidia driver. > >=20 > > Maybe the OP has done the same thing and not realized it? >=20 > That would account for what I'm seeing too and I know I've compiled > nvidia-driver with clang. Except in my case it's Xfce4 and no panics, > but completely unusable (fonts were too large, offsets calculated > wrongly, terminal emulation was like opening something in vi with > TERM=3Ddumb, mouse movement shocked, machine under constant load). FWIW, a couple of weeks ago, I started (also) tracking stable/9 daily with the following in /etc/src.conf: PORTS_MODULES=3Dx11/nvidia-driver CC=3Dclang CXX=3Dclang++ CPP=3Dclang-cpp Given that, as well as the following excerpt from this morning's typescript from the build: =2E.. =3D=3D=3D> nvidia-driver-295.49 depends on file: /usr/local/libdata/pkgco= nfig/xorg-server.pc - found =3D=3D=3D> nvidia-driver-295.49 depends on shared library: GL.1 - found =3D=3D=3D> Configuring for nvidia-driver-295.49 =3D=3D=3D> Building for nvidia-driver-295.49 =3D=3D=3D> src (all) @ -> /usr/src/sys machine -> /usr/src/sys/i386/include x86 -> /usr/src/sys/x86/include awk -f @/tools/makeobjops.awk @/kern/device_if.m -h =2E.. awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -h clang -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=3D\"295.49\" -D__K= ERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -UDEBUG -U_DEBUG -DN= DEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I. -I@ -I@/contrib/alt= q -fno-common -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestan= ding -fstack-protector -std=3Diso9899:1999 -Qunused-arguments -fstack-prote= ctor -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissin= g-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sig= n -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -W= no-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses= -equality -c nvidia_ctl.c clang -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=3D\"295.49\" -D__K= ERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -UDEBUG -U_DEBUG -DN= DEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I. -I@ -I@/contrib/alt= q -fno-common -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestan= ding -fstack-protector -std=3Diso9899:1999 -Qunused-arguments -fstack-prote= ctor -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissin= g-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sig= n -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -W= no-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses= -equality -c nvidia_dev.c =2E... I believe I am actually building with clang (on that slice -- I build it with gcc on the other slices). I did find that whether I use gcc or clang, I needed to modify xorg.conf to say: Section "Device" =2E.. Screen 0 Option "UseEdidDpi" "False" # [] EndSection =2E.. Section "Monitor" =2E.. DisplaySize 508 317 EndSection =2E... to get the font size I had when I was using the nv driver (and to which I had become accustomed). As shown above, though, I'm running FreeBSD/i386. Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --OX2aLCKeO1apYW07 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/MwxcACgkQmprOCmdXAD2OeQCgh/RoQNmhte1KAVRtj2T1uDLj 8NkAmgMumyPwyf8wdrgHT31qLll0iRzE =bgf0 -----END PGP SIGNATURE----- --OX2aLCKeO1apYW07-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 14:43:34 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D393106564A for ; Mon, 4 Jun 2012 14:43:34 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id F0A088FC0A for ; Mon, 4 Jun 2012 14:43:33 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q54EhNnx002099; Mon, 4 Jun 2012 16:43:23 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q54EhMkQ002096; Mon, 4 Jun 2012 16:43:22 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Mon, 4 Jun 2012 16:43:22 +0200 (CEST) From: Wojciech Puchar To: Bryan Drewery In-Reply-To: <4FCC126C.1020600@shatow.net> Message-ID: References: <4FCC126C.1020600@shatow.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Mon, 04 Jun 2012 16:43:23 +0200 (CEST) Cc: freebsd-hackers@freebsd.org Subject: Re: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 14:43:34 -0000 > > Justifications: > > Why the changes? This makes sense for shared hosting environments where > jails are not practical. jails are NEVER practical, it is only a necessity! Necessity to be able to run stupid software that cannot conform to basic unix standards and require to be run as root or from root or once per server. thank you very much for that patch. From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 15:01:44 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 008521065676 for ; Mon, 4 Jun 2012 15:01:44 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id 3B2C28FC14 for ; Mon, 4 Jun 2012 15:01:43 +0000 (UTC) X-T2-Spam-Status: No, hits=-1.0 required=5.0 tests=ALL_TRUSTED Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 282051660; Mon, 04 Jun 2012 17:01:22 +0200 From: Hans Petter Selasky To: Wojciech Puchar Date: Mon, 4 Jun 2012 17:00:41 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-STABLE; KDE/4.7.4; amd64; ; ) References: <201206031113.46034.hselasky@c2i.net> In-Reply-To: X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201206041700.41823.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org Subject: Re: reverse USB driver - is it possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 15:01:44 -0000 On Monday 04 June 2012 07:00:01 Wojciech Puchar wrote: > > Have a look at: > > > > sys/dev/usb/storage/ustorage_fs.c > > > > Currently just implements a RAM disk. Patches are welcome. > > many answers - contradicting itself. others says hardware is unable to do > so, you say it is done. then - how to use it? any docs? :) When USB was designed, they didn't think about what is called cross-over in the ethernet world. Therefore hardware is typically limited to host or device. Hardware that can do both is called OTG USB hardware. --HPS From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 17:15:13 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9AA31065673 for ; Mon, 4 Jun 2012 17:15:13 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 24F1D8FC0C for ; Mon, 4 Jun 2012 17:15:12 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q54HF6EG003643; Mon, 4 Jun 2012 19:15:06 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q54HF6qG003640; Mon, 4 Jun 2012 19:15:06 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Mon, 4 Jun 2012 19:15:06 +0200 (CEST) From: Wojciech Puchar To: Hans Petter Selasky In-Reply-To: <201206041700.41823.hselasky@c2i.net> Message-ID: References: <201206031113.46034.hselasky@c2i.net> <201206041700.41823.hselasky@c2i.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Mon, 04 Jun 2012 19:15:06 +0200 (CEST) Cc: freebsd-hackers@freebsd.org Subject: Re: reverse USB driver - is it possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 17:15:13 -0000 > > When USB was designed, they didn't think about what is called cross-over in > the ethernet world. Therefore hardware is typically limited to host or device. > Hardware that can do both is called OTG USB hardware. > OK fine, i now understand exactly what "OTG" means in eg. microchip microcontrollers. So this few $ things can do this, and expensive PC cannot. So the only way to do this is to make a microcontroller based bridge or there are such solutions already available? actually the only thing i want is CD/DVD USB simulator using file on my laptop or even separate flash memory (pendrive). From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 18:20:19 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E3501065670 for ; Mon, 4 Jun 2012 18:20:19 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 9C8868FC12 for ; Mon, 4 Jun 2012 18:20:18 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:subject:references:in-reply-to :content-type; q=dns; s=sweb; b=YGXtOQyrDbnQDZ/Fe/axTT2xS5eD4EQ0 Amepyvo5va6uL/Re9+0RZ1GMfLeB58kYE7KBZFA7mx40C38vM28GUl3AfaKKmeOr YNCw10hEGCBjQjz+UfyigH47IyIrIv74jBoVPukSkPS8c4bCPlCoO20ccmSeh1Y+ YizydWns84A= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:subject:references:in-reply-to :content-type; s=sweb; bh=y7runUwKVvkfMqTCvmunN87yVIlPTAGl2YAf2r rUqVE=; b=wYqu9GRQTQqqkQW0odSQyzhhyB/rszBQI16ALJSY/KOL2ZnFUDxSnB LFI/WwVvRfeTGQroElhzF8gla7Ik8Bn1IKhTGmtkqmiRSH7FOVb1uck0CgckHqez nxe39nfW6WOf0HQoazl2ci3T5EC3OhoTThcoOP1vMJeDlyx6a2VjM= Received: (qmail 47954 invoked from network); 4 Jun 2012 13:20:17 -0500 Received: from unknown (HELO ?192.168.21.109?) (bryan@shatow.net@74.94.87.209) by sweb.xzibition.com with ESMTPA; 4 Jun 2012 13:20:17 -0500 Message-ID: <4FCCFC65.4090400@shatow.net> Date: Mon, 04 Jun 2012 13:20:21 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4FCC126C.1020600@shatow.net> <20120604094214.GC1387@garage.freebsd.pl> <4FCCB584.4050808@shatow.net> In-Reply-To: <4FCCB584.4050808@shatow.net> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1516D44EF4348E22ACAD7A95" Subject: Re: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 18:20:19 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1516D44EF4348E22ACAD7A95 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 6/4/2012 8:17 AM, Bryan Drewery wrote: >=20 >=20 > On 6/4/2012 4:42 AM, Pawel Jakub Dawidek wrote: >> A library is definiately a better place, although then I wouldn't pass= >> see_other_uids as an argument, but obtain it within the function itsel= f. >=20 > Does libc make sense for this? I'm thinking yes since it's where the ut= x > functions live. >=20 > In particular this change seems to make sense in getutxent(3). >=20 > Though I do not want to violate POSIX... >=20 > The endutxent(), getutxent(), getutxid(), getutxline() and setutxe= nt() > functions are expected to conform to IEEE Std 1003.1-2008 > (``POSIX.1''). >=20 Found this [1]: An implementation that provides extended security controls may impose implementation-defined restrictions on accessing the user accounting database. In particular, the system may deny the existence of some or all of the user accounting database entries associated with users other than the caller. So POSIX allows this. I will proceed and submit another patch for review soon. Regards, Bryan Drewery bdrewery@freenode, bryan@EFNet [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/getutxid.htm= l --------------enig1516D44EF4348E22ACAD7A95 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJPzPxlAAoJEG54KsA8mwz5OicQAKqrHdLvO0tqMcLHYQFTkgBe Y8XH6PcG6JkiCxp6J5kVA6gQlOX5HKAWMD/qw7NMzxavRYuogGJf6vm3b66tp1A+ aA7yLr5MPPSW8L2FiQjskax38lWB3OSvQzrRKC6gPxQAzgkXVCpQ+krcSMGFgl6/ abX28PI9yytp1XWwv0gFO68CB5lWcmsStj5oGS2BaucpRuJuJmCJ9RWbFyeXcllY TUNfHzVaXPQ4MxDJQMwGHvCZoLRcAHZIeYdErbaKvtu17t2eGz6mnjW6mi9CJ8ol A3eTp+kh1rTKmqjWcZZuqSFYsKTO3zAus7PO3ZTNK5hyfubX9DAqydgjRaboJTep 3LadKoK6XtZaSw4apyy1HxG2piqC0i9yz/VzAVa/+SWTxBLNgCStNZlnL9c0WQli bfUOuGN2spE7hWAqJxsooiu2eO/1Rm6awxUkxKg6M969coRBMX5CnBrUIvzb20lF IADjoakUJL3pfOTV1RtCsmTGOFccevVEwrSToXTgUrZ0MRTAYHOY7n05mNpFToiv U0Cp1JEr3zFwurnyT21jUksXkZEL9mHqxyC+ZKGlLR+GL6OFlDTkUPUQQrEZDjz7 yUuseCzWkgLXO3EdArEM2tiM+RnjRn8yvTI3QyIiStDwkcgGzLxJ3IDzWmfUAQVW lmSxMqJvuk1d0ed+fAl9 =Zjx3 -----END PGP SIGNATURE----- --------------enig1516D44EF4348E22ACAD7A95-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 4 23:52:17 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC521106566B for ; Mon, 4 Jun 2012 23:52:17 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 5F22A8FC08 for ; Mon, 4 Jun 2012 23:52:17 +0000 (UTC) Received: from ur.dons.net.au (ppp14-2-17-50.lns21.adl2.internode.on.net [14.2.17.50]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id q54NppLa013647 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 5 Jun 2012 09:21:57 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: Date: Tue, 5 Jun 2012 09:21:50 +0930 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201206031113.46034.hselasky@c2i.net> <201206041700.41823.hselasky@c2i.net> To: Wojciech Puchar X-Mailer: Apple Mail (2.1278) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org, Hans Petter Selasky Subject: Re: reverse USB driver - is it possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 23:52:18 -0000 On 05/06/2012, at 2:45, Wojciech Puchar wrote: > So the only way to do this is to make a microcontroller based bridge = or there are such solutions already available? >=20 > actually the only thing i want is CD/DVD USB simulator using file on = my laptop or even separate flash memory (pendrive). ISTR someone on the lists was talking about a device by http://i-odd.com = which does what you want. I found http://renosite.com/ which is a home brew version of the same = basic idea. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 5 00:04:21 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 349AB1065746 for ; Tue, 5 Jun 2012 00:04:21 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id 199438FC16 for ; Tue, 5 Jun 2012 00:04:21 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id q5504EPO024299; Mon, 4 Jun 2012 17:04:15 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <4FCD4CFE.7000702@rawbw.com> Date: Mon, 04 Jun 2012 17:04:14 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120602 Thunderbird/12.0.1 MIME-Version: 1.0 To: Pegasus Mc Cleaft References: <4FC25A5F.4020401@rawbw.com> <20120527170142.GD1509@albert.catwhisker.org> <4FC25ECC.2060400@rawbw.com> <201205272051.00016.lobo@bsd.com.br> <20120603191215.6590eec3@udns.ultimateDNS.NET> <4FCC69CD.7010109@mthelicon.com> In-Reply-To: <4FCC69CD.7010109@mthelicon.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Chris Subject: Re: nvidia-driver-295.49 is highly unstable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2012 00:04:21 -0000 On 06/04/2012 00:54, Pegasus Mc Cleaft wrote: > You know what it could be? I just had to rebuild my user-land > because of KDE updates and I use variables in my make.conf to switch > between base GCC and CLANG. I forgot to switch back to base gcc before > compiling the nvidia driver. I installed the driver and rebooted, xorg > came up but as soon as I logged in, kwin crashed, then the machine > kernel panicked and rebooted. I rebooted and crashed a few more times > before realizing what I had done. I recompiled the driver with GCC and > the machine has been rock-stable with the nvidia driver. > > Maybe the OP has done the same thing and not realized it? Unfortunately, that's not the case. I wish it was. Yuri From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 5 14:06:29 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAF811065670 for ; Tue, 5 Jun 2012 14:06:29 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 575CE8FC1A for ; Tue, 5 Jun 2012 14:06:29 +0000 (UTC) Received: by werg1 with SMTP id g1so4572587wer.13 for ; Tue, 05 Jun 2012 07:06:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=KkF33M2HeE8JwtW+2XpVhoeLXr27Q7KSjmsmhlQ7Kx0=; b=F8+wsagS6pYStxXFFumNj0OxaVZ+jrpNxPLHcjRaIkp3MUQuSjkCpzOK/nre4ScEBG RaPUQGdo6mu9HHggUpYakAgSLodgTPlc9mm0jqP4MABa+glIo8mEVOpBhZU47kApBSs6 134mtstNhw5fgiyxVtt2eteMszvB9CAmPzCJ1JdtQe1DIm6KKE5V1CbsL1F8a5CF1+Ju 0pI//wVNmW6BQqzc3HfC+P8yW0kgGdWC+zP/b6lhicoae8NY2Fui4jZ5EZQolzFeoi71 YheRYe2/9ijAMvDio0ZJrTRlpOAX1sAIzxVZFTkCJDZoGXShhPKXxEJ8mp5mkzXThYLb ZOfQ== MIME-Version: 1.0 Received: by 10.216.70.10 with SMTP id o10mr14355309wed.51.1338905188165; Tue, 05 Jun 2012 07:06:28 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.223.151.7 with HTTP; Tue, 5 Jun 2012 07:06:28 -0700 (PDT) In-Reply-To: <4FCC126C.1020600@shatow.net> References: <4FCC126C.1020600@shatow.net> Date: Tue, 5 Jun 2012 16:06:28 +0200 X-Google-Sender-Auth: lL3RxosVMX5oSXm70_Vlui_Z6Zg Message-ID: From: Ed Schouten To: Bryan Drewery Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2012 14:06:29 -0000 Hi Bryan, 2012/6/4 Bryan Drewery : > * Added utmp group Why call it utmp? FreeBSD 9+ does not do utmp. It does utmpx. Also, too many pieces of software already abuse the group `utmp'. Instead of doing utmp handling with it, it is used to cover all sorts of "this uses TTYs" scenarios. It wouldn't amaze me if even irssi has setuid utmp on some systems, simply because it runs on a TTY. Also, there's no need for consistency. This group name would only be used by the C library to apply ownership, the log rotator and some of our tools. Still, I wonder whether it's worth the effort. In its current form, you can simply chmod 0600 the utx.* files to hide the information inside to non-administrative users. I guess you can essentially decide to make any tool setuid, simply because it can print things referring to a user. For example, why not have a tool that allows regular users to view their own auth.log entries? > @@ -212,7 +255,30 @@ struct idtab { > =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Load the last entries from the file. */ > =C2=A0 =C2=A0 =C2=A0 =C2=A0if (setutxdb(UTXDB_LOG, file) !=3D 0) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0err(1, "%s", file)= ; > + > + =C2=A0 =C2=A0 =C2=A0 /* drop setgid now that the db is open */ > + =C2=A0 =C2=A0 =C2=A0 setgid(getgid()); > + > + =C2=A0 =C2=A0 =C2=A0 /* Lookup current user information */ > + =C2=A0 =C2=A0 =C2=A0 pw =3D getpwuid(getuid()); > + > + =C2=A0 =C2=A0 =C2=A0 len =3D sizeof(see_other_uids); > + =C2=A0 =C2=A0 =C2=A0 if (sysctlbyname("security.bsd.see_other_uids", &s= ee_other_uids, &len, > NULL, 0)) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 see_other_uids =3D 0; > + =C2=A0 =C2=A0 =C2=A0 restricted =3D is_user_restricted(pw, see_other_ui= ds); > + > =C2=A0 =C2=A0 =C2=A0 =C2=A0while ((ut =3D getutxent()) !=3D NULL) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Skip this entry if = the invoking user is not permitted > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* to see it */ > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (restricted && > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 !(ut->ut_type =3D=3D BOOT_TIME || > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ut->ut_type =3D=3D SHUTDOWN_TIME || > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ut->ut_type =3D=3D OLD_TIME || > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ut->ut_type =3D=3D NEW_TIME || > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ut->ut_type =3D=3D INIT_PROCESS) && > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 strncmp(ut->ut_user, pw->pw_name, sizeof(ut->ut_user))) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 continue; > + > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (amount % 128 = =3D=3D 0) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0buf =3D realloc(buf, (amount + 128) * sizeof *ut); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0if (buf =3D=3D NULL) > Though not a common case, this code will not work properly when multiple users share the same uid. Consider comparing against the username of the logged in user (see getlogin(2)), or resolving the uid for each entry and comparing the uids. Best regards, --=20 Ed Schouten From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 5 14:29:52 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7BF91065677 for ; Tue, 5 Jun 2012 14:29:52 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7D5428FC0A for ; Tue, 5 Jun 2012 14:29:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:To:Content-Type; bh=uoxPiNNOL/OrYe/jpw8y8/kYQQ09ggTgWIdX0UUe4cA=; b=A9MY9Vx1vgBKnFuksxm7t7E34r6wO69c/DXn54Je9xXKpUs4Rckq/vZ88RJ5+oS7vUx8wg0GteRr9S3FmiwKbXvbepXYOmIKZSo/7G9+Jz6ad8npq6JHaPP8BdyoJ8P1; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SbulV-0009bo-EK for freebsd-hackers@freebsd.org; Tue, 05 Jun 2012 09:29:51 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1338906579-26372-26371/5/20; Tue, 5 Jun 2012 14:29:39 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org References: <1073159468.20120602121458@serebryakov.spb.ru> <4FC9D420.6010203@FreeBSD.org> <4FC9D68D.60405@FreeBSD.org> <4FC9FDBE.6080401@FreeBSD.org> Date: Tue, 5 Jun 2012 09:29:38 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <4FC9FDBE.6080401@FreeBSD.org> User-Agent: Opera Mail/11.64 (FreeBSD) X-SA-Score: -1.5 Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2012 14:29:52 -0000 On Sat, 02 Jun 2012 06:49:18 -0500, Florian Smeets wrote: > As far as i understand it does at least enable usage of pages up to 4MB, > perhaps someone should teach mysql about the FreeBSD's limits? > If you look at the output i sent, it certainly changes from using no > superpage mappings at all to using them to some degree, if you script > can be trusted Wow, this is a nice find. If someone were to add a patch for FreeBSD's superpages we might be able to get a nice little performance boost with little effort. Even the increase to 4MB for now is a welcome improvement. I'll make sure to put this in my toolbox.... From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 5 14:30:28 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC7B410656D0 for ; Tue, 5 Jun 2012 14:30:28 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 8BB0B8FC1B for ; Tue, 5 Jun 2012 14:30:28 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type; q=dns; s=sweb; b=2L976GtEN//HhZdGE+/o0nybEvzzE5DX YUEEW/eTysySQO05g06UjgymVbpdReuBJVq/mEcHM2ap5yKuRu/uiT3IODAJz5kf LPkaXlZd/Ku0UlZvpll8TOwVsk8rYd898LqH4o07T8ulU/Wr2dOzA2ferN63VH8a EDmz5XdBLik= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type; s=sweb; bh=p7v0hfh3v+dXawZvIUlQqAskHhxxdAFwnaJzDK aRFus=; b=mR3hfTviW725k/AuxSjWPV7SvpAIbO681EDIUBzFkhq3ZzoaF53/uG ghZJfka690cnz5sKrkxW+nKehs3AkwwNIUs6r6viMpLs2rF61LK+h15DQT5GaUUW QOIOCh/w7S3LpBK5NPEYGcbV2lXoircntNmtj9p8HOo0HZKqQWMp0= Received: (qmail 3207 invoked from network); 5 Jun 2012 09:30:26 -0500 Received: from unknown (HELO ?192.168.21.109?) (bryan@shatow.net@74.94.87.209) by sweb.xzibition.com with ESMTPA; 5 Jun 2012 09:30:26 -0500 Message-ID: <4FCE1802.9050509@shatow.net> Date: Tue, 05 Jun 2012 09:30:26 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Ed Schouten References: <4FCC126C.1020600@shatow.net> In-Reply-To: X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDF41F924DF6A4149BA3CDF6C" Cc: freebsd-hackers@freebsd.org Subject: Re: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2012 14:30:28 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDF41F924DF6A4149BA3CDF6C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 6/5/2012 9:06 AM, Ed Schouten wrote: > Hi Bryan, >=20 > 2012/6/4 Bryan Drewery : >> * Added utmp group >=20 > Why call it utmp? FreeBSD 9+ does not do utmp. It does utmpx. Also, > too many pieces of software already abuse the group `utmp'. Instead of > doing utmp handling with it, it is used to cover all sorts of "this > uses TTYs" scenarios. It wouldn't amaze me if even irssi has setuid > utmp on some systems, simply because it runs on a TTY. Also, there's > no need for consistency. This group name would only be used by the C > library to apply ownership, the log rotator and some of our tools. >=20 Yeah I considered naming it utx or utmpx. It doesn't matter to me really.= > Still, I wonder whether it's worth the effort. In its current form, > you can simply chmod 0600 the utx.* files to hide the information > inside to non-administrative users. I guess you can essentially decide > to make any tool setuid, simply because it can print things referring > to a user. For example, why not have a tool that allows regular users > to view their own auth.log entries? Yes. It's worth the effort because I am willing and able to work on it and as a shared hosting provider, I am constantly asked for access to this information. It makes sense to provide users access to their own dat= a. I also plan to expand similar effort elsewhere. >=20 >> @@ -212,7 +255,30 @@ struct idtab { >> /* Load the last entries from the file. */ >> if (setutxdb(UTXDB_LOG, file) !=3D 0) >> err(1, "%s", file); >> + >> + /* drop setgid now that the db is open */ >> + setgid(getgid()); >> + >> + /* Lookup current user information */ >> + pw =3D getpwuid(getuid()); >> + >> + len =3D sizeof(see_other_uids); >> + if (sysctlbyname("security.bsd.see_other_uids", &see_other_uid= s, &len, >> NULL, 0)) >> + see_other_uids =3D 0; >> + restricted =3D is_user_restricted(pw, see_other_uids); >> + >> while ((ut =3D getutxent()) !=3D NULL) { >> + /* Skip this entry if the invoking user is not permitt= ed >> + * to see it */ >> + if (restricted && >> + !(ut->ut_type =3D=3D BOOT_TIME || >> + ut->ut_type =3D=3D SHUTDOWN_TIME || >> + ut->ut_type =3D=3D OLD_TIME || >> + ut->ut_type =3D=3D NEW_TIME || >> + ut->ut_type =3D=3D INIT_PROCESS) && >> + strncmp(ut->ut_user, pw->pw_name, sizeof(ut->u= t_user))) >> + continue; >> + >> if (amount % 128 =3D=3D 0) { >> buf =3D realloc(buf, (amount + 128) * sizeof *u= t); >> if (buf =3D=3D NULL) >> >=20 > Though not a common case, this code will not work properly when > multiple users share the same uid. Consider comparing against the > username of the logged in user (see getlogin(2)), or resolving the uid > for each entry and comparing the uids. Good find. >=20 > Best regards, Thanks for the input! --=20 Regards, Bryan Drewery bdrewery@freenode, bryan@EFNet --------------enigDF41F924DF6A4149BA3CDF6C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJPzhgGAAoJEG54KsA8mwz5ZPIQAJ2I2WcHAgmpvUypNsFje8is W+mWIkKjgTeLt0tG69Gc/31//N+OZynm/z4N4/W1UPufZXwQdTflbsxUUNaqrTnF ht90NUcG8Wux1itZ7rq1PElvZeyFVZA8IkDzd1/OZT6+JNZE5JFj4WqhHqmyyvIu 8YPvuh30CJegqYg76fKBXEg8b/zcxu8c04rLtGI6ffiioBFfIR+bhDWCJKJuNwbR 4RtauYssJAj/jmxBMjtjfxmz4p3OHFzxHl6hb4ooDwrlaUSyW3tJvgouDxG85kyk vXD7FF2aVfVU2LUqQ0jvoJ7rwy+4WXu2sBwKvgBQDAKYEud6iHFGKNiu/axPAjvZ 39ZpsXm5xFlqzcK4DKfOXKLoUsZXB2YUHUpftFfGmMivhTtqZMwweRnlm63wpVNd f5ord1wBjwWcx6xfyXB0IkL4BYkUNLh4jEt7Br9dNqIRAEDXiJdIoRIEkOX0CjpF 5g7X08jWOKINLdmo27qm4fRyJcx4lRv21jW29/2ifvOJ5Kl9/0bkwYqoy8Zk/4un XrD4JRVjcXl1LW8al2zed9bvzK6g5NL1cuu+wePIOy7eqcKc+hL+joStY574o+x1 gkp+SWy4EkSitYiQmtpqf3xomNk67zMuptF9mYnipBcmi53V0OeFX3x94LYuhPHL CiWZJcmU9Re5anqiu0kD =kY7v -----END PGP SIGNATURE----- --------------enigDF41F924DF6A4149BA3CDF6C-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 5 14:31:45 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 79A191065672 for ; Tue, 5 Jun 2012 14:31:45 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 413A08FC16 for ; Tue, 5 Jun 2012 14:31:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:To:Content-Type; bh=CqCH+AKcnzI7RB4EHmu8kcCf7PcTmrt+z2oQY5VgF6Y=; b=XqJqnWOdG/5rTVytcW0bJuiKFq37QttxpxpUJ4ceX/NSe350EpYwAXe2GwE9MBe9T+O9DEidv/NH1Sxl4XizMqGcI9F0+kcucByD8tWxWRJet8pdncGD+lWfRC6Adqej; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SbunL-0009bo-BT for freebsd-hackers@freebsd.org; Tue, 05 Jun 2012 09:31:44 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1338906698-26372-26371/5/21; Tue, 5 Jun 2012 14:31:38 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-hackers@freebsd.org References: <201206031113.46034.hselasky@c2i.net> <201206041700.41823.hselasky@c2i.net> Date: Tue, 5 Jun 2012 09:31:38 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: User-Agent: Opera Mail/11.64 (FreeBSD) X-SA-Score: -1.5 Subject: Re: reverse USB driver - is it possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2012 14:31:45 -0000 On Mon, 04 Jun 2012 18:51:50 -0500, Daniel O'Connor wrote: > ISTR someone on the lists was talking about a device by http://i-odd.com > which does what you want. > I found http://renosite.com/ which is a home brew version of the same > basic idea. Zalman ZM-VE200 and ZM-VE300 are also what you want. Kind of nice to have ISOs on a drive and be able to make it fake a CDROM/DVDROM/BDROM at your leisure. From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 5 18:37:14 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D14831065674 for ; Tue, 5 Jun 2012 18:37:14 +0000 (UTC) (envelope-from reichert@numachi.com) Received: from away.numachi.com (away.numachi.com [66.228.38.138]) by mx1.freebsd.org (Postfix) with SMTP id 707448FC15 for ; Tue, 5 Jun 2012 18:37:14 +0000 (UTC) Received: (qmail 14268 invoked from network); 5 Jun 2012 18:30:32 -0000 Received: from unknown (HELO meisai.numachi.com) (72.71.241.47) by away.numachi.com with SMTP; 5 Jun 2012 18:30:32 -0000 Received: (qmail 33597 invoked by uid 1001); 5 Jun 2012 08:15:17 -0000 Date: Tue, 5 Jun 2012 04:15:17 -0400 From: Brian Reichert To: Mark Felder Message-ID: <20120605081517.GQ15817@numachi.com> References: <201206031113.46034.hselasky@c2i.net> <201206041700.41823.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org Subject: Re: reverse USB driver - is it possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2012 18:37:14 -0000 On Tue, Jun 05, 2012 at 09:31:38AM -0500, Mark Felder wrote: > On Mon, 04 Jun 2012 18:51:50 -0500, Daniel O'Connor > wrote: > > >ISTR someone on the lists was talking about a device by http://i-odd.com > >which does what you want. > >I found http://renosite.com/ which is a home brew version of the same > >basic idea. > > Zalman ZM-VE200 and ZM-VE300 are also what you want. Kind of nice to have > ISOs on a drive and be able to make it fake a CDROM/DVDROM/BDROM at your > leisure. Recently got a ZM-VE300, based on such advice. I'm new to it, but I had one instance of a desktop ditsro live CD fail because it perceived the faked CD-ROM device to have timed out. Just one data point. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- Brian Reichert BSD admin/developer at large From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 5 21:31:03 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 515991065679 for ; Tue, 5 Jun 2012 21:31:03 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id E02548FC16 for ; Tue, 5 Jun 2012 21:31:02 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 154971DD65E; Tue, 5 Jun 2012 23:31:02 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id F37292848C; Tue, 5 Jun 2012 23:31:01 +0200 (CEST) Date: Tue, 5 Jun 2012 23:31:01 +0200 From: Jilles Tjoelker To: Bryan Drewery Message-ID: <20120605213101.GA13339@stack.nl> References: <4FCC126C.1020600@shatow.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FCC126C.1020600@shatow.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org Subject: Re: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2012 21:31:03 -0000 On Sun, Jun 03, 2012 at 08:42:04PM -0500, Bryan Drewery wrote: > I've written up a patch to add some privacy to last(1) while still > giving non-privileged users access to their own login history. > This is still a work in progress. I am reaching out to make sure my > approach is proper and to get some input on code sharing. My goal is to > add this support to w(1) and who(1) as well. FWIW I have been running a > similar patch on my own shared-hosting systems (pre-utmpx) for a few years. > Changes: > * Added utmp group > * All utmpx files are 660 root:utmp The utmp group was previously (on other systems) used to allow applications write access to utmp without making them setuid root (making them setgid utmp instead). > * last(1) runs setgid(utmp) and drops this as soon as the utmpx files > are opened. > * Users in the wheel or utmp group can see all entries > * IFF security.bsd.see_other_uids=0: users only see their own entries, > as well as shutdown/boot/init times. > * If security.bsd.see_other_uids=1, all entries are always shown, as it > does now. > Justifications: > Why the changes? This makes sense for shared hosting environments where > jails are not practical. A user should be able to see their own login > history, to see if someone has been accessing their account, but not to > see the IPs of other users. The intention is *not* to disallow them to > see that other users of the system. Obviously they can just cat > /etc/passwd. This is just about IP privacy. > Why the setgid? Allow reading the entries, but disallow directly opening > the utx files. I've seen some shared hosts incorrectly chmod 0 > /usr/bin/last, but still leave the utmp files wide open for reading! > Why the utmp group? It's consistent with other systems (OpenBSD, Linux), > and allows giving a user access to see all entries, without granting > them wheel or allowing a non-privileged user to run as setgid(wheel). It > also helps mitigates security concerns by using a specific group only > having extra privilege to utmpx files. > I originally had not planned for security.bsd.see_other_uids, but > considering POLA and consistency, it makes sense. This requires every utmpx access to go through a setgid binary, regardless of the value of security.bsd.see_other_uids. If called by a user that is not root or in the utmp group, getutxent(3) and related APIs become worthless. While POSIX permits this (security restriction denying all visibility of utmpx), this is not what applications expect. For example, tcsh and zsh offer a "watch" feature that reports on logins and logouts by calling utmpx APIs. To avoid this, the utmpx APIs could communicate with a privileged daemon if the files are not readable. The daemon can check the identity of the caller via getpeereid(3). (Unfortunately, even if getpeereid() is bypassed and LOCAL_PEERCRED called directly, only 16 groups can be queried. Therefore the daemon cannot check the process credential for the groups but will have to check the group database for the user.) Also, the attack surface of such a daemon may be smaller than that of a setuid/setgid program. Alternatively, the daemon could be a setgid program that is spawned by the utmpx APIs when needed. -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 5 21:42:36 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6F30106564A for ; Tue, 5 Jun 2012 21:42:36 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 71E3D8FC12 for ; Tue, 5 Jun 2012 21:42:36 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type; q=dns; s=sweb; b=NrQWRk4+3X4Ob9fVxEYrcxoVL1tjVRxA gPCSlCp2JMgGSD+krXlpnEERURteQaHwQVNxHSOgd119tDzkny3TaJfS03mxF9wX bg/SfbQ6iKaaHxgSQNSjz1gPXADdlqghrx5U/FgfetxBLRNNvE4TlH2cEVIPPxV4 6Kop/lqU638= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type; s=sweb; bh=CZoaZo83f7pB3rwZzXnRXWQfwsyGwUWLS2Plg9 zQjdE=; b=zlo4J8JZ3YR6xqH15Vz72KvMA/HNtR6zfqI8p6jWAhr0arKL7FTj6l Ijx8cyJsi8VxkwegaOhrqVy8rURxs4nWS6ga6pBgeS7ctzFZyFjQ4tQZJ5hLh5ac 2/bqJYBXUYv9hx5H0a1229v4TDxiC3F3/3QUXzScqstrJLoPXxfIA= Received: (qmail 36522 invoked from network); 5 Jun 2012 16:42:34 -0500 Received: from unknown (HELO ?192.168.21.109?) (bryan@shatow.net@74.94.87.209) by sweb.xzibition.com with ESMTPA; 5 Jun 2012 16:42:34 -0500 Message-ID: <4FCE7D4C.7010702@shatow.net> Date: Tue, 05 Jun 2012 16:42:36 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Jilles Tjoelker References: <4FCC126C.1020600@shatow.net> <20120605213101.GA13339@stack.nl> In-Reply-To: <20120605213101.GA13339@stack.nl> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig96174B77C8C6AF3CEC499B58" Cc: freebsd-hackers@freebsd.org Subject: Re: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2012 21:42:37 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig96174B77C8C6AF3CEC499B58 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 6/5/2012 4:31 PM, Jilles Tjoelker wrote: > To avoid this, the utmpx APIs could communicate with a privileged daemo= n > if the files are not readable. The daemon can check the identity of the= > caller via getpeereid(3). (Unfortunately, even if getpeereid() is > bypassed and LOCAL_PEERCRED called directly, only 16 groups can be > queried. Therefore the daemon cannot check the process credential for > the groups but will have to check the group database for the user.) >=20 > Also, the attack surface of such a daemon may be smaller than that of a= > setuid/setgid program. >=20 > Alternatively, the daemon could be a setgid program that is spawned by > the utmpx APIs when needed. I like this idea a lot. I will experiment with that. --=20 Regards, Bryan Drewery bdrewery@freenode, bryan@EFNet --------------enig96174B77C8C6AF3CEC499B58 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJPzn1QAAoJEG54KsA8mwz5wYIQAIPe9MAiejKXJOufsxtbsy5W iyJ2Kqg5quwCQhMoKtDgTXGz62T2DAK2JXuJ9eH4h2jkBk25ljtnCLfuejBtG3+A 2sbA5JnraJG7MMTs9ORblTtLGJtBLQ9wg4ckmwmwGTgTFaXNQwLWe6fd0eJHKOMe UCzceWmAEdBJ9PTPON82uUpF7kTfAIFl6xuMA4CEnQShH94msFToWqbJuN68lfGz +ZaFadcZNZJg1KYqdxwbhCNQ5YxpG12RwraDdqn07BptLp1TgAUVA1sqC6u08gM4 3tIJTQ1Toy59B3BrtpRKXWe/p1KZXLTXkeTf5X02z6Mrfa37V+FzaZE5pMSvJ4Q7 lU/q0iJXzqBbuhaNc1/dyNTlResZfXKx7m0pNeN/Wwem1ojCvV1LtXntekaANyi1 fk8/CSpiYZ9+mXa93G4g2NlJjhMdbnoEy+f3xAjF9xIyMcqjJI2nGiRn3oXTfnRE xClTPyI2ykr1nR+kqum6928XDkfzr8CUC1rfVWZyeIEdLCmca3oQnwwy/muj9cZA MThCs0q9wCoVPHmfJbZdwojHa9UvMtAMJ9eK1iGfug1mFS7pqG1lOWUlHASzR+FK PhdogztNLuIY5LNH8KQEyW0iUdVBFPTWPket7tSiszQi1LFN4Q4ogMegisKx7JqI 0avT4louipO8LpSEKIGg =5oqN -----END PGP SIGNATURE----- --------------enig96174B77C8C6AF3CEC499B58-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 6 08:55:03 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87F391065673 for ; Wed, 6 Jun 2012 08:55:03 +0000 (UTC) (envelope-from prvs=150441fdbd=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 15D3F8FC0C for ; Wed, 6 Jun 2012 08:55:02 +0000 (UTC) X-Spam-Processed: mail1.multiplay.co.uk, Wed, 06 Jun 2012 09:54:47 +0100 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-5.0 required=6.0 tests=USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.2.5 Received: from r2d2 ([188.220.16.49]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50020119080.msg for ; Wed, 06 Jun 2012 09:54:46 +0100 X-MDRemoteIP: 188.220.16.49 X-Return-Path: prvs=150441fdbd=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org Message-ID: <4C72B90050084D58B9DEC99DCC82E6B5@multiplay.co.uk> From: "Steven Hartland" To: Date: Wed, 6 Jun 2012 09:54:47 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Subject: dtrace crashes on ustack X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 08:55:03 -0000 When running dtrace looking at syscall::write:return for a java app with a ustack call for the first few calls I get:- dtrace: ERROR: gelf_getehdr() failed: No error: 0 And then after a number dtrace crashes:- #0 0x0000000800fcc59d in _malloc_prefork () from /lib/libc.so.7 [New Thread 80283c500 (LWP 100815/dtrace)] [New Thread 8012041c0 (LWP 101294/initial thread)] (gdb) bt #0 0x0000000800fcc59d in _malloc_prefork () from /lib/libc.so.7 #1 0x0000000800fcdd2d in _malloc_thread_cleanup () from /lib/libc.so.7 #2 0x000000080066190e in pthread_exit () from /lib/libthr.so.3 #3 0x0000000800658523 in pthread_getprio () from /lib/libthr.so.3 #4 0x0000000000000000 in ?? () Cannot access memory at address 0x7fffffbff000 Kernel is compiled with dtrace, world has been rebuild with WITH_CTF=1 as has openjdk7 port. Any ideas? Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 6 10:04:09 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F2F6C1065670 for ; Wed, 6 Jun 2012 10:04:09 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from smtp4.clear.net.nz (smtp4.clear.net.nz [203.97.37.64]) by mx1.freebsd.org (Postfix) with ESMTP id B93728FC16 for ; Wed, 6 Jun 2012 10:04:09 +0000 (UTC) Received: from mxin1-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp4.clear.net.nz (CLEAR Net Mail) with ESMTP id <0M5600DGTXADMS40@smtp4.clear.net.nz> for hackers@freebsd.org; Wed, 06 Jun 2012 22:04:02 +1200 (NZST) Received: from 202-0-48-19.paradise.net.nz (HELO localhost) ([202.0.48.19]) by smtpin1.paradise.net.nz with ESMTP; Wed, 06 Jun 2012 22:04:02 +1200 Date: Wed, 06 Jun 2012 22:03:33 +1200 From: Andrew Turner To: hackers@freebsd.org Message-id: <20120606220333.28686407@fubar.geek.nz> MIME-version: 1.0 X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; i386-portbld-freebsd8.0) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Pirate: Arrrr Cc: Subject: Wide character types X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 10:04:10 -0000 I've been working on getting the ARM EABI working with FreeBSD. As part of the EABI spec the Procedure Call Standard for the ARM Architecture (AAPCS) defines wchar_t as either an unsigned int or an unsigned short with the former as the preferred type. FreeBSD defines wchar_t as a __wchar_t, which is defined as a __ct_rune_t, which is defined as an int. wint_t and rune_t are also defined in terms of __ct_rune_t. wint_t must be a signed type as it needs to hols a WEOF which is defined as -1. The type of rune_t appears to need to be the same as wint_t as the tow* and isw* functions are defined as taking a wint_t by the documentation but __ct_rune_t in the code and compare this value against __rune_t values. My question is am I correct in thinking rune_t and wint_t should be defined as __ct_rune_t with __ct_rune_t defined as an int while wchar_t should be defined as an unsigned int in ARM EABI and defined as an int elsewhere? Andrew From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 6 11:22:07 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D0F41065688 for ; Wed, 6 Jun 2012 11:22:07 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 56B068FC08 for ; Wed, 6 Jun 2012 11:22:04 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id C1EE17D7; Wed, 6 Jun 2012 13:22:02 +0200 (CEST) Date: Wed, 6 Jun 2012 13:20:12 +0200 From: Pawel Jakub Dawidek To: Jilles Tjoelker Message-ID: <20120606112011.GB1381@garage.freebsd.pl> References: <4FCC126C.1020600@shatow.net> <20120605213101.GA13339@stack.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gj572EiMnwbLXET9" Content-Disposition: inline In-Reply-To: <20120605213101.GA13339@stack.nl> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org, Bryan Drewery Subject: Re: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 11:22:07 -0000 --gj572EiMnwbLXET9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 05, 2012 at 11:31:01PM +0200, Jilles Tjoelker wrote: > Also, the attack surface of such a daemon may be smaller than that of a > setuid/setgid program. Really? I don't see that. With current patch and setgid to utmp the process can only read some files that don't even contain very sensitive data (like passwords). Any privileged daemon is much bigger threat. Also, do we really want a daemon running all the time just to be able to parse utx files? > Alternatively, the daemon could be a setgid program that is spawned by > the utmpx APIs when needed. Still seems a bit too far for my taste. Spawning a daemon somewhere from within library doesn't sound like a good idea to me... At least until we have something like launchd that can start such services on demand. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --gj572EiMnwbLXET9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/PPOsACgkQForvXbEpPzS+VQCgoEBeWsnsVUGa5Xo9phhAKkDC 0oMAn3hcqNFvnGbeVMehccAzsZ//Hn6T =nGyE -----END PGP SIGNATURE----- --gj572EiMnwbLXET9-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 6 16:15:17 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CDF7E1065672 for ; Wed, 6 Jun 2012 16:15:17 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 552668FC1A for ; Wed, 6 Jun 2012 16:15:16 +0000 (UTC) Received: by bkvi18 with SMTP id i18so7485348bkv.13 for ; Wed, 06 Jun 2012 09:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:x-mailer; bh=lPlDxoAxwBTEjmGgXnInrtpq7oqrRj7npGS6umFVH9k=; b=viAGjY/0m0ubZcLCjS3/KRcHKH0L4QMU2HbnHjn88Xl2DkC4BdCcc6a5JAldK2SBtB g8XlBFECNQN4LcmDn+GgWSGahtWruvWXNEnIuqmzyjuTBbYoz2rro3qEa1hUmjWpHpDJ fdmbj47gN5xWFc/FkDk4Y6vWxGBPZuV1ANevt5hsoS0VESULmpI6lEkrn0TU/a7vKiXp J5ZnOjnkA9H68nUmoJbIb9XruQ7RjeKLpFrIXgKmNqRJ3C7gdyJTOMVVBg9Gf4QbhD+S tu9FbslJo12nlYNCtQJ7SsiRX10a6yAn+OMYYPdUyQMxJMUUn8EhBz8rgiyMMXXnQ+YQ L0+A== Received: by 10.205.133.197 with SMTP id hz5mr13068909bkc.126.1338999316013; Wed, 06 Jun 2012 09:15:16 -0700 (PDT) Received: from DOMYPC ([82.193.208.173]) by mx.google.com with ESMTPS id ie3sm480382bkc.1.2012.06.06.09.15.12 (version=SSLv3 cipher=OTHER); Wed, 06 Jun 2012 09:15:14 -0700 (PDT) Message-ID: <20120606.161514.685.1@DOMY-PC> From: rank1seeker@gmail.com To: hackers@freebsd.org Date: Wed, 06 Jun 2012 18:15:14 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable X-Mailer: POP Peeper (3.8.1.0) Cc: Subject: CD bootcode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 16:15:17 -0000 FreeBSD's CD bootcode '/boot/cdboot' is targeting stage 3 boot -> = loader=0D=0AFor example, stage 2 boot '/boot/boot' is attempting the = same.=0D=0A=0D=0AIn my case of a '/boot/loader', '/boot' is a = symlink!=0D=0A=0D=0ASo if '/boot/boot' works with symlinks, why = '/boot/cdboot' doesn't!=0D=0AYes, I did use Rock-Ridge extensions, upon = creation of 'cd.iso'=0D=0A=0D=0A=0D=0A# qemu -curses -m 512 -cdrom cd.iso = -boot d=0D=0A--=0D=0ACD Loader 1.2=0D=0A=0D=0ABuilding the boot loader = arguments=0D=0ALooking up /BOOT/LOADER... File not found=0D=0ALooking up = /boot/loader... Read Error: 0x0c=0D=0A--=0D=0A=0D=0A=0D=0AAlso regardinq = qemu ...=0D=0A=0D=0AWhen running qemu on ttyv0 via curses:=0D=0A# qemu = -curses ...=0D=0A=0D=0AI'm not able to exit from it.=0D=0AAlso, I would = like to scroll back whole qemu's output (i.e; boot = procedure)=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6 From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 6 21:24:21 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 99FE51065673; Wed, 6 Jun 2012 21:24:21 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 3552E8FC1A; Wed, 6 Jun 2012 21:24:21 +0000 (UTC) Received: from toad.stack.nl (toad.stack.nl [IPv6:2001:610:1108:5010::135]) by mx1.stack.nl (Postfix) with ESMTP id 850A21DD5BB; Wed, 6 Jun 2012 23:24:20 +0200 (CEST) Received: by toad.stack.nl (Postfix, from userid 1677) id 7C6023F444; Wed, 6 Jun 2012 23:24:20 +0200 (CEST) Date: Wed, 6 Jun 2012 23:24:20 +0200 From: Jilles Tjoelker To: Pawel Jakub Dawidek Message-ID: <20120606212420.GA84474@stack.nl> References: <4FCC126C.1020600@shatow.net> <20120605213101.GA13339@stack.nl> <20120606112011.GB1381@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120606112011.GB1381@garage.freebsd.pl> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org, Bryan Drewery Subject: Re: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 21:24:21 -0000 On Wed, Jun 06, 2012 at 01:20:12PM +0200, Pawel Jakub Dawidek wrote: > On Tue, Jun 05, 2012 at 11:31:01PM +0200, Jilles Tjoelker wrote: > > Also, the attack surface of such a daemon may be smaller than that of a > > setuid/setgid program. > Really? I don't see that. With current patch and setgid to utmp the > process can only read some files that don't even contain very sensitive > data (like passwords). > Any privileged daemon is much bigger threat. Also, do we really want a > daemon running all the time just to be able to parse utx files? The daemon would run with non-root privileges just sufficient to read the utmpx files. If we have a good way to start it, the attack surface is limited to what you can do with its socket and this can be cut down tightly. On the other hand, an attacker can control various process attributes of a setgid program such as the output file, a subset of signals, rlimits and a subset of environment variables. For example, last, w and who have some degree of locale support (time/date formats). Also, in this particular case, dropping privileges does not help much since the utmpx file descriptor is almost as valuable as the group credentials. I agree that leaving a daemon running for this is ugly. > > Alternatively, the daemon could be a setgid program that is spawned by > > the utmpx APIs when needed. > Still seems a bit too far for my taste. Spawning a daemon somewhere from > within library doesn't sound like a good idea to me... At least until we > have something like launchd that can start such services on demand. The suggested approach is used by old implementations of grantpt(). If the kernel does not set up the ownership of a new pseudo terminal properly, grantpt() can invoke a setuid root binary, for example /usr/libexec/pt_chown. Similarly, the utmpx APIs might invoke a setgid helper if they cannot read the files themselves. Communication would be over a pipe. This has the downside of having a setgid program at all but things like locale support are handled by the calling (unprivileged) application and not by the setgid program. -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 6 21:41:01 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE2F01065688 for ; Wed, 6 Jun 2012 21:41:01 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id 801F68FC14 for ; Wed, 6 Jun 2012 21:41:01 +0000 (UTC) Received: from [IPv6:::1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q56LenBF082870 for ; Wed, 6 Jun 2012 14:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1339018850; bh=5auHHvII25ccXwgGY1bDoX3/YGi4Lu4EaCqbhNl7eOU=; h=Subject:From:Reply-To:To:Content-Type:Date:Message-ID: Mime-Version:Content-Transfer-Encoding; b=wOA51IGpH31rCXyXQbv3L/hWZxqS0a3HHwemoXxKosiiOtMkjyS+0paXrsJbYnIbr b71IdsS8MiuAaXIraMMtRbxjBTdKBL2DenylAecI/FLM6rvkp7D2et5ZjWZS7P+TT7 vbryHOEjLkCyvRFq06SrcmqgUXkP7Ay8BDA4hSPA= From: Sean Bruno To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Date: Wed, 06 Jun 2012 14:40:49 -0700 Message-ID: <1339018849.10177.3.camel@powernoodle-l7.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 018849007 Subject: tkcvs/tkdiff X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 21:41:01 -0000 Does anyone have tkdiff working from ports right now? I keep getting nothing but a "wish" window popping up when I install tkcvs. I didn't see any obvious results with my internet search foo, so thought I'd ask here as well as in other places. Sean From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 6 21:56:20 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66279106566B; Wed, 6 Jun 2012 21:56:20 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id 1CE3C8FC23; Wed, 6 Jun 2012 21:56:19 +0000 (UTC) Received: from [IPv6:::1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q56LtwpH088841; Wed, 6 Jun 2012 14:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1339019759; bh=GwaFAOsFFW2it3szePXeNPvY0jzzdVu6gHDY6tkM9sM=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=EnkWf96bm+MesH6hkdsm43vIAwXBPN2IvMqWAk1DgCOQhGleoD7i+JV0qrEGvC4UP a3RXe8cMmFrz3wmjo1/wcdjQLqCBEFY2M3sU9n5VvcurEYJYmWbh83HFBy2rnD4ekh /aBorf6OypHcR8DrELWNGRxOyDmtfNsnqjXpStOg= From: Sean Bruno To: "sbruno@freebsd.org" In-Reply-To: <1339018849.10177.3.camel@powernoodle-l7.corp.yahoo.com> References: <1339018849.10177.3.camel@powernoodle-l7.corp.yahoo.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 06 Jun 2012 14:55:58 -0700 Message-ID: <1339019758.10177.7.camel@powernoodle-l7.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 019758003 Cc: "freebsd-hackers@freebsd.org" Subject: Re: tkcvs/tkdiff X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 21:56:20 -0000 On Wed, 2012-06-06 at 14:40 -0700, Sean Bruno wrote: > I keep getting > nothing but a "wish" window popping up when I install tkcvs. Correction: I get a "wish" window popping up when I run "tkdiff file1 file2" Sean From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 6 23:26:14 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 06E0F106566C for ; Wed, 6 Jun 2012 23:26:14 +0000 (UTC) (envelope-from flo@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C173D8FC0A; Wed, 6 Jun 2012 23:26:13 +0000 (UTC) Received: from nibbler-wlan.fritz.box (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q56NQC8o024611; Wed, 6 Jun 2012 23:26:12 GMT (envelope-from flo@FreeBSD.org) Message-ID: <4FCFE714.6070502@FreeBSD.org> Date: Thu, 07 Jun 2012 01:26:12 +0200 From: Florian Smeets User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120604 Thunderbird/14.0a2 MIME-Version: 1.0 To: Mark Felder References: <1073159468.20120602121458@serebryakov.spb.ru> <4FC9D420.6010203@FreeBSD.org> <4FC9D68D.60405@FreeBSD.org> <4FC9FDBE.6080401@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.5a1pre Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1DE882128519AB31F794ADD5" Cc: freebsd-hackers@FreeBSD.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 23:26:14 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1DE882128519AB31F794ADD5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05.06.12 16:29, Mark Felder wrote: > On Sat, 02 Jun 2012 06:49:18 -0500, Florian Smeets wr= ote: >=20 >> As far as i understand it does at least enable usage of pages up to 4M= B, >> perhaps someone should teach mysql about the FreeBSD's limits? >> If you look at the output i sent, it certainly changes from using no >> superpage mappings at all to using them to some degree, if you script >> can be trusted >=20 > Wow, this is a nice find. If someone were to add a patch for FreeBSD's = =20 > superpages we might be able to get a nice little performance boost with= =20 > little effort. Even the increase to 4MB for now is a welcome improvemen= t. =20 > I'll make sure to put this in my toolbox.... I played with this some more. MySQL does not seem to use superpages. After a mysqld restart Ivan's script and procstat showed superpage mappings for mysqld, but it seems once MySQL "touches" the memory it's not in superpages anymore. I looked at the MySQL code a bit and one would need to add FreeBSD support in a couple of places. Perhaps I'll find some time to try this, but i cannot make any promises. Florian --------------enig1DE882128519AB31F794ADD5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAk/P5xQACgkQapo8P8lCvwmoxACgijeaWkjFA7mQP4hbe0/MoUe6 vVgAoIgeo8s4SK1RobNTGZVcfjX4aeZQ =CiIp -----END PGP SIGNATURE----- --------------enig1DE882128519AB31F794ADD5-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 01:34:04 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 461E01065700; Thu, 7 Jun 2012 01:34:04 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0A9C38FC0C; Thu, 7 Jun 2012 01:34:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=Message-Id:Cc:To:Date:From:Subject:Content-Type:Content-Transfer-Encoding:Mime-Version:In-Reply-To:References; bh=IarqHJhgrqHGZNSh7E1xB9AoGAB0qoxkUwdvRnZVOz0=; b=ARDs/R+vPy4NCITykcz3cD0v2XW+pKlrUgSATYG1Y9vd0DcsgjsuKhAbwpesLhI1IzbziJE0HPu95IYmIsSr1rJ94jUF2CMjtqCZU3+FAWvlS3fC+0KeYqTHNqZRzeRB; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1ScRbu-000NNn-7r; Wed, 06 Jun 2012 20:34:03 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1339032836-26372-26371/5/49; Thu, 7 Jun 2012 01:33:56 +0000 References: <201205311048.45813.jhb@freebsd.org> <201205311157.42909.jhb@freebsd.org> User-Agent: K-9 Mail for Android In-Reply-To: <201205311157.42909.jhb@freebsd.org> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 From: Mark Felder Date: Wed, 6 Jun 2012 20:34:02 -0500 To: John Baldwin Message-Id: <19d73256-b7c6-417e-a051-a5faeabf219d@email.android.com> X-SA-Score: -1.5 Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 01:34:04 -0000 Hi guys I'm excitedly posting this from my phone. Good news for you = guys, bad news for us -- we were building HA storage on vmware for a = client and can now replicate the crash on demand. I'll be posting = details when I get home to my PC tonight, but this hopefully is enough = to replicate the crash for any curious followers: ESXi 5 9 or 9-STABLE HAST=20 1 cpu is fine 1GB of ram UFS SUJ on HAST device No special loader.conf, sysctl, etc No need for VMWare tools Run Bonnie++ on the HAST device We can get the crash to happen on the first run of bonnie++ right now. = I'll post the exact specs and precise command run in the PR. We found an = old post from 2004 when we looked up the process state obtained from = CTRL+T -- flswai -- which describes the symptoms nearly perfectly. http://unix.derkeiler.com/Mailing-Lists/FreeBSD/stable/2004-02/0250.html= =20 Hopefully this gets us closer to a fix... From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 07:22:27 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9A4A106566C for ; Thu, 7 Jun 2012 07:22:27 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3BC6D8FC0C for ; Thu, 7 Jun 2012 07:22:27 +0000 (UTC) Received: by werg1 with SMTP id g1so198692wer.13 for ; Thu, 07 Jun 2012 00:22:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Ln69nQwtLqGWXR0nuzp2E/5S0Ossn12/T3Kyf8t8Gq0=; b=tFd617dIglwUEN9+VE//mMc/J2CrOJx2C8sqMVlA5i5GiH1JK/vtJkDbsv5Azf3ahn e4ZGV2ywJ+3myKI5TSOkKqy91aMMfvE20BBSt21ZbxkCex4JQq7MXfD9GVhpmhnfT8Qr pWhWFZ4VFzKPJQVdeGHu9YNPuXW3rPmyHhO1T90ZPS+ypnLDuSkWauD22ftKye3dWQO6 Lmg0rqh8zzX7qVmpx0o/OhEJYDOmY5CEv4DVF9RrnEl2HzQ+vhd8g0i1NuSDfCHjPRCx QCr4nNUecarYv546PJoIipSp3mBz3Sfn8aclAyJwx5TtMlPQzwx/FflPDnOOmfma+k1l Wucw== MIME-Version: 1.0 Received: by 10.216.194.95 with SMTP id l73mr114560wen.206.1339053746140; Thu, 07 Jun 2012 00:22:26 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.223.151.7 with HTTP; Thu, 7 Jun 2012 00:22:25 -0700 (PDT) In-Reply-To: <20120605213101.GA13339@stack.nl> References: <4FCC126C.1020600@shatow.net> <20120605213101.GA13339@stack.nl> Date: Thu, 7 Jun 2012 09:22:25 +0200 X-Google-Sender-Auth: blhExYt026mp1TmiU3NHQgrcYQg Message-ID: From: Ed Schouten To: Jilles Tjoelker Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, Bryan Drewery Subject: Re: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 07:22:27 -0000 2012/6/5 Jilles Tjoelker : > To avoid this, the utmpx APIs could communicate with a privileged daemon > if the files are not readable. The daemon can check the identity of the > caller via getpeereid(3). +1. I would really like to have something like this. Another advantage of this approach would be that it's a lot easier to change the file format then. There's only one application that interacts with these files. -- Ed Schouten From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 07:28:01 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D227F106566B; Thu, 7 Jun 2012 07:28:01 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 30EF08FC14; Thu, 7 Jun 2012 07:28:01 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so237644wgb.31 for ; Thu, 07 Jun 2012 00:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=HFfzruHWWHLwcfpgAHY+YZSGGsQXTH8ZELMLQSbdTQY=; b=J2/zEY6NH5dlkAAP3KszTO2QuQzCPKBUrUttSX0qPBDKz2eyGyvV/3EU7lzc7hiqQm uqkbQ8c5hkHSob7ZzM8sb6vFVzPBm9X8T3CS6+Tq378WNSTXFMaVFXI5hDwWeYyQqBiU mVjZZGSxAMqBehhBjEmuLKnEtDd8B8BKEKrnHE7NdFmcR9U8Y5XzZuNmxqKoSQ321KI2 Qh23P+r27Kq4G4NtW8wmIolQagwApEr8RieJ2Ba+WbVKF2gsNbl8KxQcdkbGorSsA48x hJU2pZzb9r4MFvh4j5kQ9lQ7zuHmCLk8zbnzOaY7o+yMEDTjL8K1I819l/fm2pfkXlI6 sN+g== MIME-Version: 1.0 Received: by 10.216.144.69 with SMTP id m47mr144446wej.86.1339054079299; Thu, 07 Jun 2012 00:27:59 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.223.151.7 with HTTP; Thu, 7 Jun 2012 00:27:59 -0700 (PDT) In-Reply-To: <20120606112011.GB1381@garage.freebsd.pl> References: <4FCC126C.1020600@shatow.net> <20120605213101.GA13339@stack.nl> <20120606112011.GB1381@garage.freebsd.pl> Date: Thu, 7 Jun 2012 09:27:59 +0200 X-Google-Sender-Auth: d59E4iUC27V8LTbqWwMipklndD0 Message-ID: From: Ed Schouten To: Pawel Jakub Dawidek Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, Jilles Tjoelker , Bryan Drewery Subject: Re: [RFC] last(1) with security.bsd.see_other_uids support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 07:28:01 -0000 2012/6/6 Pawel Jakub Dawidek : > Any privileged daemon is much bigger threat. Also, do we really want a > daemon running all the time just to be able to parse utx files? Well, if you think of it, it's not a very strange idea: - You can simply get rid of /var/run/utx.active. There's no need for this to be written to disk. It can just stay in memory. - You can use devd to track the destruction of TTYs, so you can automatically garbage collect stale entries for pseudo-terminals. Right now a `killall -9 xterm' may leave stale entries behind. - The other files aren't _that_ big. On FreeBSD, utx.log only stores entries for the last month. Especially if you implement getutxid()/getutxuser() as separate calls, much of the filtering is already done by the daemon. -- Ed Schouten From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 07:45:29 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B5D8A106566B; Thu, 7 Jun 2012 07:45:29 +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 A56D78FC0A; Thu, 7 Jun 2012 07:45:28 +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 KAA16325; Thu, 07 Jun 2012 10:45:27 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ScXPK-000CVe-Ny; Thu, 07 Jun 2012 10:45:26 +0300 Message-ID: <4FD05C16.9040905@FreeBSD.org> Date: Thu, 07 Jun 2012 10:45:26 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 7bit Cc: Subject: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 07:45:29 -0000 It's long been a wish of mine to have an ability to decide at boot time that a system should boot in "console-only" mode. That is, that no graphics/X applications like e.g. xdm/kdm/gdm are automatically started even when they are configured to do so. Here is my attempt at implementing that: https://gitorious.org/~avg/freebsd/avgbsd/commit/96f7051d63d4286ef6f0196d241e7855338a6ed7?format=patch All the option does at boot time is setting of 'inhibit_gui' variable for kernel environment. I envision that this variable could be properly and gracefully handled in various startup scripts and/or application startup logic. But to ensure that the option is always honored I've also added "ultimate protection" to syscons that prohibits KDSETMODE/KD_GRAPHICS ioctl. What do you think? -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 08:47:47 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 277B8106564A; Thu, 7 Jun 2012 08:47:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 7ED428FC1A; Thu, 7 Jun 2012 08:47:46 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q578ldJM057113; Thu, 7 Jun 2012 11:47:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q578lc8F027538; Thu, 7 Jun 2012 11:47:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q578lc2m027537; Thu, 7 Jun 2012 11:47:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 7 Jun 2012 11:47:38 +0300 From: Konstantin Belousov To: Andriy Gapon Message-ID: <20120607084738.GT85127@deviant.kiev.zoral.com.ua> References: <4FD05C16.9040905@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="D5tFrmRBv7YOLFOK" Content-Disposition: inline In-Reply-To: <4FD05C16.9040905@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-hackers@freebsd.org Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 08:47:47 -0000 --D5tFrmRBv7YOLFOK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 07, 2012 at 10:45:26AM +0300, Andriy Gapon wrote: >=20 > It's long been a wish of mine to have an ability to decide at boot time t= hat a > system should boot in "console-only" mode. That is, that no graphics/X > applications like e.g. xdm/kdm/gdm are automatically started even when th= ey are > configured to do so. >=20 > Here is my attempt at implementing that: > https://gitorious.org/~avg/freebsd/avgbsd/commit/96f7051d63d4286ef6f0196d= 241e7855338a6ed7?format=3Dpatch >=20 > All the option does at boot time is setting of 'inhibit_gui' variable for= kernel > environment. I envision that this variable could be properly and gracefu= lly > handled in various startup scripts and/or application startup logic. > But to ensure that the option is always honored I've also added "ultimate > protection" to syscons that prohibits KDSETMODE/KD_GRAPHICS ioctl. This is too much, IMO. I understand why you may want to disable auto-start of login manager, but preventing a user from running X at all until she learns about kenv -u _and_ obscure code somewhere in the kernel, is unreasonable. --D5tFrmRBv7YOLFOK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/QaqoACgkQC3+MBN1Mb4g2qACeJ9mSp+p1G+Isbr5ouBZOYC1a UVEAn3Tka90jbzLIJ1CvC/GEKh68V5GF =OsvM -----END PGP SIGNATURE----- --D5tFrmRBv7YOLFOK-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 08:56:55 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C5A310657A9 for ; Thu, 7 Jun 2012 08:56:55 +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 C748D8FC0A for ; Thu, 7 Jun 2012 08:56:54 +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 LAA17165; Thu, 07 Jun 2012 11:56:52 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ScYWS-000Cb0-A5; Thu, 07 Jun 2012 11:56:52 +0300 Message-ID: <4FD06CD3.3080602@FreeBSD.org> Date: Thu, 07 Jun 2012 11:56:51 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: Konstantin Belousov References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> In-Reply-To: <20120607084738.GT85127@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 08:56:55 -0000 on 07/06/2012 11:47 Konstantin Belousov said the following: > On Thu, Jun 07, 2012 at 10:45:26AM +0300, Andriy Gapon wrote: >> >> It's long been a wish of mine to have an ability to decide at boot time that a >> system should boot in "console-only" mode. That is, that no graphics/X >> applications like e.g. xdm/kdm/gdm are automatically started even when they are >> configured to do so. >> >> Here is my attempt at implementing that: >> https://gitorious.org/~avg/freebsd/avgbsd/commit/96f7051d63d4286ef6f0196d241e7855338a6ed7?format=patch >> >> All the option does at boot time is setting of 'inhibit_gui' variable for kernel >> environment. I envision that this variable could be properly and gracefully >> handled in various startup scripts and/or application startup logic. >> But to ensure that the option is always honored I've also added "ultimate >> protection" to syscons that prohibits KDSETMODE/KD_GRAPHICS ioctl. > This is too much, IMO. I understand why you may want to disable > auto-start of login manager, but preventing a user from running X at all > until she learns about kenv -u _and_ obscure code somewhere in the kernel, > is unreasonable. A user doesn't have to select the option unless he needs to. A "simple user" can just reboot without selecting the option to get back his X. A user doesn't have to learn anything about the code, just about kenv and "magic" inhibit_gui variable. IMO. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 09:57:48 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EB311065676; Thu, 7 Jun 2012 09:57:48 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id D448A8FC12; Thu, 7 Jun 2012 09:57:47 +0000 (UTC) Received: by laai10 with SMTP id i10so359507laa.13 for ; Thu, 07 Jun 2012 02:57:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=3aJy5O5aZ0iShFQQi7SPMpxj1gQ/kt1UONTZQ456354=; b=ByknHC0ifyNL1SRaqxPyaZvlR9m3YFh/wbkSR6DIrbvdSASJG6MLVUdToeGYBBuICJ hg2bVO71OkThpefgQN4zl4baCkFx1+FpYk4S2EsS+Vm4GcsnaTwVkgAT+PWEoWZpoFcG oYzYBVJ0bbtCO17GnbQCJsMBo5BJLYWZwP61zcGEeyaNXdKeJosfiAvaqu+czZSSbpvU EdawPCTOFyqcLb8HPFNv523v1sFFBKbwKnuAs3BpKLw1+rhDHBzRgkiFc/pkxJSZ0tcN oE9WcbOh43F/DCC5t++gO2TZCUuUnnzSCgMA8BQXKZXuO9JjNTJq6HmgUzpEs6ItdhAN m7FA== Received: by 10.152.135.200 with SMTP id pu8mr1780541lab.8.1339063066722; Thu, 07 Jun 2012 02:57:46 -0700 (PDT) Received: from localhost ([78.157.92.5]) by mx.google.com with ESMTPS id hi14sm3990690lab.4.2012.06.07.02.57.44 (version=SSLv3 cipher=OTHER); Thu, 07 Jun 2012 02:57:45 -0700 (PDT) Date: Thu, 7 Jun 2012 12:57:41 +0300 From: Gleb Kurtsou To: Andriy Gapon Message-ID: <20120607095741.GA1361@reks> References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4FD06CD3.3080602@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Konstantin Belousov , freebsd-hackers@FreeBSD.org Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 09:57:48 -0000 On (07/06/2012 11:56), Andriy Gapon wrote: > on 07/06/2012 11:47 Konstantin Belousov said the following: > > On Thu, Jun 07, 2012 at 10:45:26AM +0300, Andriy Gapon wrote: > >> > >> It's long been a wish of mine to have an ability to decide at boot time that a > >> system should boot in "console-only" mode. That is, that no graphics/X > >> applications like e.g. xdm/kdm/gdm are automatically started even when they are > >> configured to do so. > >> > >> Here is my attempt at implementing that: > >> https://gitorious.org/~avg/freebsd/avgbsd/commit/96f7051d63d4286ef6f0196d241e7855338a6ed7?format=patch > >> > >> All the option does at boot time is setting of 'inhibit_gui' variable for kernel > >> environment. I envision that this variable could be properly and gracefully > >> handled in various startup scripts and/or application startup logic. > >> But to ensure that the option is always honored I've also added "ultimate > >> protection" to syscons that prohibits KDSETMODE/KD_GRAPHICS ioctl. > > This is too much, IMO. I understand why you may want to disable > > auto-start of login manager, but preventing a user from running X at all > > until she learns about kenv -u _and_ obscure code somewhere in the kernel, > > is unreasonable. > > A user doesn't have to select the option unless he needs to. > A "simple user" can just reboot without selecting the option to get back his X. > A user doesn't have to learn anything about the code, just about kenv and > "magic" inhibit_gui variable. What do you think about adding generic support for overriding *_enable options in rc.conf? I'd like to be able to disable services at boot prompt, e.g. # set rc.slim_enable="no" -- overrides slim_enable="yes" in rc.conf Similarly rc.pf_enable="no" Then introduce x_enable knob (=yes by default) to disable login managers. User will be able to override this setting with # service xdm forcestart Thanks, Gleb. From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 10:06:15 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6811A1065675 for ; Thu, 7 Jun 2012 10:06:15 +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 B247E8FC16 for ; Thu, 7 Jun 2012 10:06:14 +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 NAA18301; Thu, 07 Jun 2012 13:06:11 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ScZbX-000CgJ-Ga; Thu, 07 Jun 2012 13:06:11 +0300 Message-ID: <4FD07D11.9030002@FreeBSD.org> Date: Thu, 07 Jun 2012 13:06:09 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: Gleb Kurtsou References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> <20120607095741.GA1361@reks> In-Reply-To: <20120607095741.GA1361@reks> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , freebsd-hackers@FreeBSD.org Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 10:06:15 -0000 on 07/06/2012 12:57 Gleb Kurtsou said the following: > What do you think about adding generic support for overriding *_enable > options in rc.conf? > > I'd like to be able to disable services at boot prompt, e.g. > # set rc.slim_enable="no" -- overrides slim_enable="yes" in rc.conf > > Similarly rc.pf_enable="no" > > Then introduce x_enable knob (=yes by default) to disable login > managers. User will be able to override this setting with > # service xdm forcestart I think that this is an excellent idea. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 11:20:36 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D03A106566C for ; Thu, 7 Jun 2012 11:20:36 +0000 (UTC) (envelope-from vhaisman@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 527FF8FC19 for ; Thu, 7 Jun 2012 11:20:36 +0000 (UTC) Received: by dadv36 with SMTP id v36so776971dad.13 for ; Thu, 07 Jun 2012 04:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/vLu1nwYDCH+DpS+bwAEjp1xUSRk4blnD5f0nYOKbuU=; b=qv9UHoTqhRqP1/h9xofiuBHn/XL4HE3c5kyZjKZGFIFKuaonelr4KOQV7Cw0cKo8Vc CMcZlNO2U0Lmyi8yC+4CPRVsdkM1n1pFRQJOHxJXyAz6gGQv454XH4Hhr2ptimNY1a4F qQEEF0dMXcxbTwlXawq/BdI+Tll8v6FzqMlvsJNe5W6t3kJjlKap/YGvjhxfF417fS74 cekzWtNmbzZNKMTYS2jSmIm6a8+XrgVFpjYI883+yxuO20nIp3vro1FuLfjdSI/DWzAN ql0ezU0k9WW0ChRBeoQ5yAsrMAjDp90WwuMot2+8V10tl8Lp9PuJElaiLWtAvyVyVIYc 1j8w== MIME-Version: 1.0 Received: by 10.68.136.68 with SMTP id py4mr572825pbb.151.1339068029976; Thu, 07 Jun 2012 04:20:29 -0700 (PDT) Received: by 10.68.136.193 with HTTP; Thu, 7 Jun 2012 04:20:29 -0700 (PDT) In-Reply-To: <20120606220333.28686407@fubar.geek.nz> References: <20120606220333.28686407@fubar.geek.nz> Date: Thu, 7 Jun 2012 13:20:29 +0200 Message-ID: From: =?UTF-8?Q?V=C3=A1clav_Zeman?= To: Andrew Turner Content-Type: text/plain; charset=UTF-8 Cc: hackers@freebsd.org Subject: Re: Wide character types X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 11:20:36 -0000 On 6 June 2012 12:03, Andrew Turner wrote: > I've been working on getting the ARM EABI working with FreeBSD. > > As part of the EABI spec the Procedure Call Standard for the ARM > Architecture (AAPCS) defines wchar_t as either an unsigned int or an > unsigned short with the former as the preferred type. FreeBSD defines > wchar_t as a __wchar_t, which is defined as a __ct_rune_t, which is > defined as an int. > > wint_t and rune_t are also defined in terms of __ct_rune_t. wint_t must > be a signed type as it needs to hols a WEOF which is defined as -1. > > The type of rune_t appears to need to be the same as wint_t as the tow* > and isw* functions are defined as taking a wint_t by the documentation > but __ct_rune_t in the code and compare this value against __rune_t > values. > > My question is am I correct in thinking rune_t and wint_t should be > defined as __ct_rune_t with __ct_rune_t defined as an int while wchar_t > should be defined as an unsigned int in ARM EABI and defined as an int > elsewhere? Non-authoritative answer: I think you conclusion is correct. I think that freebsd-standards@freebsd.org would be a better audience for this kind of question. -- VZ From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 12:37:53 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74FB1106566C for ; Thu, 7 Jun 2012 12:37:53 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 416AA8FC1B for ; Thu, 7 Jun 2012 12:37:53 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 920D5B977; Thu, 7 Jun 2012 08:37:52 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 7 Jun 2012 08:21:39 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <20120606.161514.685.1@DOMY-PC> In-Reply-To: <20120606.161514.685.1@DOMY-PC> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1250" Content-Transfer-Encoding: 7bit Message-Id: <201206070821.40068.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 07 Jun 2012 08:37:52 -0400 (EDT) Cc: rank1seeker@gmail.com Subject: Re: CD bootcode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 12:37:53 -0000 On Wednesday, June 06, 2012 12:15:14 pm rank1seeker@gmail.com wrote: > FreeBSD's CD bootcode '/boot/cdboot' is targeting stage 3 boot -> loader > For example, stage 2 boot '/boot/boot' is attempting the same. > > In my case of a '/boot/loader', '/boot' is a symlink! > > So if '/boot/boot' works with symlinks, why '/boot/cdboot' doesn't! > Yes, I did use Rock-Ridge extensions, upon creation of 'cd.iso' Because I didn't make cdboot's lookup routine handle symlinks. It also doesn't look at Rock-Ridge extensions and only uses the base ISO-9660 directory entries. That was enough fun to write in assembly. OTOH, CD sectors are 2k, so you do have that much room to work with and can probably fit a more advanced directory lookup into cdboot. I'm happy to review any patches you come up with. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 13:58:28 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B9CDD1065672; Thu, 7 Jun 2012 13:58:28 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0F5BA8FC0C; Thu, 7 Jun 2012 13:58:27 +0000 (UTC) Received: by bkvi18 with SMTP id i18so710102bkv.13 for ; Thu, 07 Jun 2012 06:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=wMROMgm6Zi+RcoL2jSNYKaVp4SkyJvQ/24b4LeA0DeE=; b=hoTm+D+sg/AheXzUIDZiSz2zc4hjLM39dqLB6Z0cFcudKaWekQjaEBTy0NufmC4Nzm n2Ajn6iP8sTTkh6EenN/x7XUYH17tBnNo2hSputGniXRm9NbAYLlH7Lt10+IC1Zq0Zbs 9/z9rJOKvRzCesAFhsM1rqhVv/heDVZr5QQgrz82scGCUNYJqYdvEnVpE1UrPItRuevo ytWKYj0tQRaxoOSE9qPWC405QA3uWzNGpRQ9ZQ8Oi7I+WGA2EAabrdxVBBYL/bAk+aFZ 3D1ET4cGJULONRHqHjbbFd5zKe5ovSrj/QFzKfsOzIq2HlLaVJkjiWcElZtfHdSqMLDy H1jQ== Received: by 10.204.145.79 with SMTP id c15mr1607088bkv.60.1339077506862; Thu, 07 Jun 2012 06:58:26 -0700 (PDT) Received: from DOMYPC (93-141-79-111.adsl.net.t-com.hr. [93.141.79.111]) by mx.google.com with ESMTPS id gm18sm3943227bkc.7.2012.06.07.06.58.23 (version=SSLv3 cipher=OTHER); Thu, 07 Jun 2012 06:58:25 -0700 (PDT) Message-ID: <20120607.135825.592.1@DOMY-PC> From: rank1seeker@gmail.com To: "John Baldwin" , hackers@freebsd.org Date: Thu, 07 Jun 2012 15:58:25 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: <201206070821.40068.jhb@freebsd.org> References: <20120606.161514.685.1@DOMY-PC> <201206070821.40068.jhb@freebsd.org> X-Mailer: POP Peeper (3.8.1.0) Cc: Subject: Re: CD bootcode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 13:58:28 -0000 ----- Original Message -----=0D=0AFrom: John Baldwin = =0D=0ATo: freebsd-hackers@freebsd.org=0D=0ACc: = rank1seeker@gmail.com=0D=0ADate: Thu, 7 Jun 2012 08:21:39 = -0400=0D=0ASubject: Re: CD bootcode=0D=0A=0D=0A> On Wednesday, June 06, = 2012 12:15:14 pm rank1seeker@gmail.com wrote:=0D=0A> > FreeBSD's CD = bootcode '/boot/cdboot' is targeting stage 3 boot -> loader=0D=0A> > For = example, stage 2 boot '/boot/boot' is attempting the same.=0D=0A> > = =0D=0A> > In my case of a '/boot/loader', '/boot' is a symlink!=0D=0A> > = =0D=0A> > So if '/boot/boot' works with symlinks, why '/boot/cdboot' = doesn't!=0D=0A> > Yes, I did use Rock-Ridge extensions, upon creation of = 'cd.iso'=0D=0A> =0D=0A> Because I didn't make cdboot's lookup routine = handle symlinks. It=0D=0A> also doesn't look at Rock-Ridge extensions = and only uses the base=0D=0A> ISO-9660 directory entries. That was = enough fun to write in assembly.=0D=0A> OTOH, CD sectors are 2k, so you = do have that much room to work with=0D=0A> and can probably fit a more = advanced directory lookup into cdboot.=0D=0A> =0D=0A> I'm happy to review = any patches you come up with.=0D=0A> =0D=0A> -- =0D=0A> John = Baldwin=0D=0A=0D=0A=0D=0AI need to correct myself.=0D=0ABOTH stage 2 boot = '/boot/boot' AND '/boot/cdboot' don't work with = symlinks!=0D=0A=0D=0A'/boot/boot' on UFS sees symlink as file, same as = '/boot/cdboot' does so on Rock-Ridge.=0D=0A=0D=0AI can handle = '/boot/boot' by providing full path to loader via = 'boot.config'=0D=0A'/boot/cdboot' doesn't have such a file, so in = '/usr/src/sys/boot/i386/cdboot/cdboot.s':=0D=0A--=0D=0Aloader_paths: = .asciz "/BOOT/LOADER"=0D=0A .asciz "/boot/loader"=0D=0A = .byte 0=0D=0A--=0D=0A=0D=0AI injected third '.asciz' line = with full path to 'loader' and recompiled it.=0D=0AAnd what is first line = "/BOOT/LOADER" doing in there ?!?=0D=0A=0D=0ABut even when loader is = finally started, loader handles symlinks on UFS (kicked by '/boot/boot'), = BUT fails so, on Rock-Ridge iso (kicked by '/boot/cdboot')=0D=0ALooks = like loader must be made into looking at Rock-Ridge = extensions.=0D=0A=0D=0AI can't provide patches, as I only know 'sh', = 'php' (and web related langs)=0D=0AAbove code I've patched, only because = I've hunted patterns.=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6 From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 14:31:44 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id C245E1065673; Thu, 7 Jun 2012 14:31:44 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 07EDA1D28F; Thu, 7 Jun 2012 14:29:26 +0000 (UTC) Message-ID: <4FD0BAC6.6000304@FreeBSD.org> Date: Thu, 07 Jun 2012 07:29:26 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Gleb Kurtsou References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> <20120607095741.GA1361@reks> In-Reply-To: <20120607095741.GA1361@reks> X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , freebsd-hackers@FreeBSD.org, Andriy Gapon Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 14:31:44 -0000 On 06/07/2012 02:57 AM, Gleb Kurtsou wrote: > What do you think about adding generic support for overriding *_enable > options in rc.conf? > > I'd like to be able to disable services at boot prompt, e.g. > # set rc.slim_enable="no" -- overrides slim_enable="yes" in rc.conf > > Similarly rc.pf_enable="no" > > Then introduce x_enable knob (=yes by default) to disable login > managers. User will be able to override this setting with > # service xdm forcestart Why not just: boot single user fsck -p mount -a $EDITOR /etc/rc.conf[.local] From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 15:00:44 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 75772106566C; Thu, 7 Jun 2012 15:00:44 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from dhcp170-36-red.yandex.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx2.freebsd.org (Postfix) with ESMTP id 8E3CC1A6C5A; Thu, 7 Jun 2012 15:00:07 +0000 (UTC) Message-ID: <4FD0C1F4.2060108@FreeBSD.org> Date: Thu, 07 Jun 2012 19:00:04 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120511 Thunderbird/12.0.1 MIME-Version: 1.0 To: net@freebsd.org, hackers@freebsd.org Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: Subject: ifconfig accepting hostname as ipv4 address X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 15:00:44 -0000 Hello list! Since the early days ifconfig(8) has the following functionality: .. address For the DARPA-Internet family, the address is either a host name present in the host name data base, hosts(5), or a DARPA Internet address expressed in the Internet standard “dot notation”. E.g. one can write `ifconfig em0 some_possibly_unqualified_fqdn` and get inet address assigned to the card with classful mask. Now this can lead to "fun" things if you have misprinted some keyword and this keyword exists in the local DNS zone (or wildcard is configured). The most favorite one (we have wilcard configured in one of our search zones): 18:45 [0] dhcp170-36-red# ifconfig vlan123 desroy 18:45 [0] dhcp170-36-red# echo $? 0 18:45 [0] dhcp170-36-red# ifconfig vlan123 vlan123: flags=8003 metric 0 mtu 1500 ether 00:00:00:00:00:00 inet 213.180.204.242 netmask 0xffffff00 broadcast 213.180.204.255 inet6 fe80::222:4dff:fe50:cd2f%vlan123 prefixlen 64 scopeid 0xd nd6 options=21 vlan: 0 parent interface: This is also one of the reasons why ifconfig sometimes "hangs" on invalid input. Moreover, ifconfig em0 some_valid_fqdn/MASK silently ignores it, so you can't set valid CIDR address using this notation. Classful era has ended more than 10 years ago, do we still want to keep this behavior? -- WBR, Alexander From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 15:12:23 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 002D71065687; Thu, 7 Jun 2012 15:12:22 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9D2398FC17; Thu, 7 Jun 2012 15:12:22 +0000 (UTC) Received: by obcni5 with SMTP id ni5so1327774obc.13 for ; Thu, 07 Jun 2012 08:12:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Pz8GStknNPJ7IALLe8jXGrI4l/DF9YazS10hu3Td5Uk=; b=gg2c855wUVhtu/OcnISQGk2BTyO4ArcIPB/nQK5UnK+3RYGOTHLlaU12jgrrGBGM+V Ce26TQO2oaSfkD7DDqlbwPXO+iSdhpnitNFeFhStG1iti848RgFuapu7vpP1iLydv0NH +GPie7vW8jBHJ9oi3mNLZDhqSfEPTJfy2ktddsSbvKEJyvbj1BjSNB+0afhCUzP5MebC 8wHl9q7bjPUriWMbKHj4hQd0Oy5cRFzORWzH+ILpw0mNdHA55RRhRuah5P164C3AlVw9 5ujg4KUYeT88hIFDf8F+7MsS9U+snqiJNLOFEEDZ0GqUK6EQxRD7j/pA/AJVeIxZVH19 LBaQ== MIME-Version: 1.0 Received: by 10.182.164.69 with SMTP id yo5mr2557210obb.17.1339081942114; Thu, 07 Jun 2012 08:12:22 -0700 (PDT) Received: by 10.76.98.77 with HTTP; Thu, 7 Jun 2012 08:12:22 -0700 (PDT) In-Reply-To: <4FD0BAC6.6000304@FreeBSD.org> References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> <20120607095741.GA1361@reks> <4FD0BAC6.6000304@FreeBSD.org> Date: Thu, 7 Jun 2012 08:12:22 -0700 Message-ID: From: Garrett Cooper To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Cc: Konstantin Belousov , freebsd-hackers@freebsd.org, Gleb Kurtsou , Andriy Gapon Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 15:12:23 -0000 On Thu, Jun 7, 2012 at 7:29 AM, Doug Barton wrote: > On 06/07/2012 02:57 AM, Gleb Kurtsou wrote: >> What do you think about adding generic support for overriding *_enable >> options in rc.conf? >> >> I'd like to be able to disable services at boot prompt, e.g. >> # set rc.slim_enable="no" -- overrides slim_enable="yes" in rc.conf >> >> Similarly rc.pf_enable="no" >> >> Then introduce x_enable knob (=yes by default) to disable login >> managers. User will be able to override this setting with >> # service xdm forcestart > > Why not just: > > boot single user > fsck -p > mount -a > $EDITOR /etc/rc.conf[.local] I've run into _multiple_ scenarios where this isn't possible because the terminal settings are screwed up in single user mode, and had to resort to `sed -i '' `. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 15:16:02 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6827106566B; Thu, 7 Jun 2012 15:16:02 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5C80D8FC1E; Thu, 7 Jun 2012 15:16:02 +0000 (UTC) Received: by yenl8 with SMTP id l8so555215yen.13 for ; Thu, 07 Jun 2012 08:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=VFBApbuAXKHlhMyN/eI9AUt+ln3xYtMqnDDD/JD4olQ=; b=AZoWbAYHcgJKb6ul99vBJMXCEok7fc9aKx2gz1pNNM3ts1ReEh7+4ytfQ1Sz3P64cD LbmSmmpaMhtW2hXfOEeGDCImZ7KpePKm97lZjG00D9NCYiVRpUPZEQctFFKOfYm9Lrav iBH5yTwIVrxNxGElYSJ3OIelbdAsqMUEhEMb1cTBUTpoem48SMigLONzVQTIxwQhVW2f UzCqN6aLsV54lqRHHlbPWbwJPVkCEHHOKCRJl4TH7mGBZeUnq423TxPSpT5gZymf0rAV ti9elR7XdpSmWeJ+2fPzeHBdmIr8rXrzxD6IiEvxa+QRmwoBZEYKGZF5V+vSvEAscLbW KKHw== MIME-Version: 1.0 Received: by 10.60.14.193 with SMTP id r1mr2556330oec.16.1339082160841; Thu, 07 Jun 2012 08:16:00 -0700 (PDT) Received: by 10.76.98.77 with HTTP; Thu, 7 Jun 2012 08:16:00 -0700 (PDT) In-Reply-To: <20120607095741.GA1361@reks> References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> <20120607095741.GA1361@reks> Date: Thu, 7 Jun 2012 08:16:00 -0700 Message-ID: From: Garrett Cooper To: Gleb Kurtsou Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Konstantin Belousov , freebsd-hackers@freebsd.org, Andriy Gapon Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 15:16:02 -0000 On Thu, Jun 7, 2012 at 2:57 AM, Gleb Kurtsou wrote= : > On (07/06/2012 11:56), Andriy Gapon wrote: >> on 07/06/2012 11:47 Konstantin Belousov said the following: >> > On Thu, Jun 07, 2012 at 10:45:26AM +0300, Andriy Gapon wrote: >> >> >> >> It's long been a wish of mine to have an ability to decide at boot ti= me that a >> >> system should boot in "console-only" mode. =A0That is, that no graphi= cs/X >> >> applications like e.g. xdm/kdm/gdm are automatically started even whe= n they are >> >> configured to do so. >> >> >> >> Here is my attempt at implementing that: >> >> https://gitorious.org/~avg/freebsd/avgbsd/commit/96f7051d63d4286ef6f0= 196d241e7855338a6ed7?format=3Dpatch >> >> >> >> All the option does at boot time is setting of 'inhibit_gui' variable= for kernel >> >> environment. =A0I envision that this variable could be properly and g= racefully >> >> handled in various startup scripts and/or application startup logic. >> >> But to ensure that the option is always honored I've also added "ulti= mate >> >> protection" to syscons that prohibits KDSETMODE/KD_GRAPHICS ioctl. >> > This is too much, IMO. I understand why you may want to disable >> > auto-start of login manager, but preventing a user from running X at a= ll >> > until she learns about kenv -u _and_ obscure code somewhere in the ker= nel, >> > is unreasonable. >> >> A user doesn't have to select the option unless he needs to. >> A "simple user" can just reboot without selecting the option to get back= his X. >> A user doesn't have to learn anything about the code, just about kenv an= d >> "magic" inhibit_gui variable. > > What do you think about adding generic support for overriding *_enable > options in rc.conf? > > I'd like to be able to disable services at boot prompt, e.g. > # set rc.slim_enable=3D"no" -- overrides slim_enable=3D"yes" in rc.conf > > Similarly rc.pf_enable=3D"no" > > Then introduce x_enable knob (=3Dyes by default) to disable login > managers. User will be able to override this setting with > # service xdm forcestart It needs to be profiled, but I would be curious what the slowdown would be for this change. Also, it sort of introduces a fun chicken and egg problem with sourcing rc.conf files, like I discovered recently at $JOB. Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 15:40:14 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 630AB106566B; Thu, 7 Jun 2012 15:40:14 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id B67218FC16; Thu, 7 Jun 2012 15:40:13 +0000 (UTC) Received: by bkvi18 with SMTP id i18so845572bkv.13 for ; Thu, 07 Jun 2012 08:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wqyG2UvduT3cUdeRAr3vUisOstrIOuDVxhv8Md1CbTg=; b=rmPfLKR3UEPZXObSPcdbu7WOKM8lPF5wW5RoIBMMOBhJ/kon8PDGbY3z/S0JRq8g78 +NBFnxrxH7elbFQmcZDXskBeZH1uNfhvbY5DrehZmE+UD5jZf+MKxq+FzDEEj0cBQudh TmfMjaSd2nQacLGa59Hvh+Hag8f/9+H0H70AmX2xXKsUu0h/AMTbxbr+Mntzj2NcuPXB iBOWxNZGtm5sbU6m1LjqTGpTwaecl3CcwbZBEG31QIWozOPTnn1o3p+dzGelY6JJgThE 6XGSv94iuHia+DFzImtBTKYfx6iYCcg/ESg/jsGu6yaJ3s3zuCl2+i8FB/uauCm9f4MF XL5w== MIME-Version: 1.0 Received: by 10.205.117.3 with SMTP id fk3mr1992059bkc.136.1339083612638; Thu, 07 Jun 2012 08:40:12 -0700 (PDT) Received: by 10.204.171.138 with HTTP; Thu, 7 Jun 2012 08:40:12 -0700 (PDT) Received: by 10.204.171.138 with HTTP; Thu, 7 Jun 2012 08:40:12 -0700 (PDT) In-Reply-To: <20120607.135825.592.1@DOMY-PC> References: <20120606.161514.685.1@DOMY-PC> <201206070821.40068.jhb@freebsd.org> <20120607.135825.592.1@DOMY-PC> Date: Thu, 7 Jun 2012 16:40:12 +0100 Message-ID: From: Chris Rees To: rank1seeker@gmail.com Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: hackers@freebsd.org Subject: Re: CD bootcode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 15:40:14 -0000 On Jun 7, 2012 2:58 PM, wrote: > > ----- Original Message ----- > From: John Baldwin > To: freebsd-hackers@freebsd.org > Cc: rank1seeker@gmail.com > Date: Thu, 7 Jun 2012 08:21:39 -0400 > Subject: Re: CD bootcode > > > On Wednesday, June 06, 2012 12:15:14 pm rank1seeker@gmail.com wrote: > > > FreeBSD's CD bootcode '/boot/cdboot' is targeting stage 3 boot -> loader > > > For example, stage 2 boot '/boot/boot' is attempting the same. > > > > > > In my case of a '/boot/loader', '/boot' is a symlink! > > > > > > So if '/boot/boot' works with symlinks, why '/boot/cdboot' doesn't! > > > Yes, I did use Rock-Ridge extensions, upon creation of 'cd.iso' > > > > Because I didn't make cdboot's lookup routine handle symlinks. It > > also doesn't look at Rock-Ridge extensions and only uses the base > > ISO-9660 directory entries. That was enough fun to write in assembly. > > OTOH, CD sectors are 2k, so you do have that much room to work with > > and can probably fit a more advanced directory lookup into cdboot. > > > > I'm happy to review any patches you come up with. > > > > -- > > John Baldwin > > > I need to correct myself. > BOTH stage 2 boot '/boot/boot' AND '/boot/cdboot' don't work with symlinks! > > '/boot/boot' on UFS sees symlink as file, same as '/boot/cdboot' does so on Rock-Ridge. > > I can handle '/boot/boot' by providing full path to loader via 'boot.config' > '/boot/cdboot' doesn't have such a file, so in '/usr/src/sys/boot/i386/cdboot/cdboot.s': > -- > loader_paths: .asciz "/BOOT/LOADER" > .asciz "/boot/loader" > .byte 0 > -- > > I injected third '.asciz' line with full path to 'loader' and recompiled it. > And what is first line "/BOOT/LOADER" doing in there ?!? > Because strict ISO9660 8.3 is case insensitive and uses caps? Chris From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 15:44:50 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 79B771065670; Thu, 7 Jun 2012 15:44:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 1D02A17889E; Thu, 7 Jun 2012 15:42:31 +0000 (UTC) Message-ID: <4FD0CBE7.305@FreeBSD.org> Date: Thu, 07 Jun 2012 08:42:31 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Garrett Cooper References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> <20120607095741.GA1361@reks> <4FD0BAC6.6000304@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , freebsd-hackers@freebsd.org, Gleb Kurtsou , Andriy Gapon Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 15:44:50 -0000 On 06/07/2012 08:12 AM, Garrett Cooper wrote: > I've run into _multiple_ scenarios where this isn't possible because > the terminal settings are screwed up in single user mode, and had to > resort to `sed -i '' `. If that happens, a) report it! SUM is a very important part of FreeBSD, and it needs to always work. b) There were problems after the cons25 -> xterm conversion that have almost all been fixed nowadays c) Try using a simpler shell, like /bin/sh, or even /rescue/sh d) Obviously don't try to do SUM with a shell that is not compiled static hth, Doug From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 16:07:31 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B9CCF1065670 for ; Thu, 7 Jun 2012 16:07:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 90B118FC1E for ; Thu, 7 Jun 2012 16:07:31 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0F1BEB97F; Thu, 7 Jun 2012 12:07:31 -0400 (EDT) From: John Baldwin To: rank1seeker@gmail.com Date: Thu, 7 Jun 2012 11:16:33 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <20120606.161514.685.1@DOMY-PC> <201206070821.40068.jhb@freebsd.org> <20120607.135825.592.1@DOMY-PC> In-Reply-To: <20120607.135825.592.1@DOMY-PC> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1250" Content-Transfer-Encoding: 7bit Message-Id: <201206071116.33215.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 07 Jun 2012 12:07:31 -0400 (EDT) Cc: hackers@freebsd.org Subject: Re: CD bootcode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 16:07:31 -0000 On Thursday, June 07, 2012 9:58:25 am rank1seeker@gmail.com wrote: > ----- Original Message ----- > From: John Baldwin > To: freebsd-hackers@freebsd.org > Cc: rank1seeker@gmail.com > Date: Thu, 7 Jun 2012 08:21:39 -0400 > Subject: Re: CD bootcode > > > On Wednesday, June 06, 2012 12:15:14 pm rank1seeker@gmail.com wrote: > > > FreeBSD's CD bootcode '/boot/cdboot' is targeting stage 3 boot -> loader > > > For example, stage 2 boot '/boot/boot' is attempting the same. > > > > > > In my case of a '/boot/loader', '/boot' is a symlink! > > > > > > So if '/boot/boot' works with symlinks, why '/boot/cdboot' doesn't! > > > Yes, I did use Rock-Ridge extensions, upon creation of 'cd.iso' > > > > Because I didn't make cdboot's lookup routine handle symlinks. It > > also doesn't look at Rock-Ridge extensions and only uses the base > > ISO-9660 directory entries. That was enough fun to write in assembly. > > OTOH, CD sectors are 2k, so you do have that much room to work with > > and can probably fit a more advanced directory lookup into cdboot. > > > > I'm happy to review any patches you come up with. > > > > -- > > John Baldwin > > > I need to correct myself. > BOTH stage 2 boot '/boot/boot' AND '/boot/cdboot' don't work with symlinks! Correct. > '/boot/boot' on UFS sees symlink as file, same as '/boot/cdboot' does so on Rock-Ridge. > > I can handle '/boot/boot' by providing full path to loader via 'boot.config' > '/boot/cdboot' doesn't have such a file, so in '/usr/src/sys/boot/i386/cdboot/cdboot.s': > -- > loader_paths: .asciz "/BOOT/LOADER" > .asciz "/boot/loader" > .byte 0 > -- > > I injected third '.asciz' line with full path to 'loader' and recompiled it. > And what is first line "/BOOT/LOADER" doing in there ?!? Plain ISO-9660 always uses uppercase letters for filenames. There is a mkisofs flag to use lowercase, but by default it uppercases all filenames. > But even when loader is finally started, loader handles symlinks on UFS (kicked by '/boot/boot'), BUT fails so, on Rock-Ridge iso (kicked by '/boot/cdboot') > Looks like loader must be made into looking at Rock-Ridge extensions. It is src/lib/libstand/cd9660.c that would have to be patched. It already has limited Rock-Ridge support, so adding symlink support to cd9660_open() may not be that hard to do. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 18:11:00 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CAAF1106566B; Thu, 7 Jun 2012 18:11:00 +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 E23968FC1C; Thu, 7 Jun 2012 18:10:59 +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 VAA22916; Thu, 07 Jun 2012 21:10:58 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SchAg-000DER-B6; Thu, 07 Jun 2012 21:10:58 +0300 Message-ID: <4FD0EEB1.10103@FreeBSD.org> Date: Thu, 07 Jun 2012 21:10:57 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: Doug Barton References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> <20120607095741.GA1361@reks> <4FD0BAC6.6000304@FreeBSD.org> In-Reply-To: <4FD0BAC6.6000304@FreeBSD.org> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 18:11:00 -0000 on 07/06/2012 17:29 Doug Barton said the following: > On 06/07/2012 02:57 AM, Gleb Kurtsou wrote: >> What do you think about adding generic support for overriding *_enable >> options in rc.conf? >> >> I'd like to be able to disable services at boot prompt, e.g. >> # set rc.slim_enable="no" -- overrides slim_enable="yes" in rc.conf >> >> Similarly rc.pf_enable="no" >> >> Then introduce x_enable knob (=yes by default) to disable login >> managers. User will be able to override this setting with >> # service xdm forcestart > > Why not just: > > boot single user > fsck -p > mount -a > $EDITOR /etc/rc.conf[.local] > Ah, right. Why provide a way to do something using one command at one prompt (or even toggling a menu option using a single keystroke) when you can already do the same using multiple commands at multiple places (and also trying to not forget to undo your changes later)... -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 20:35:08 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F06341065670; Thu, 7 Jun 2012 20:35:07 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.76.211]) by mx1.freebsd.org (Postfix) with ESMTP id 9D1E78FC0A; Thu, 7 Jun 2012 20:35:07 +0000 (UTC) Received: from mail.0x20.net (mail.0x20.net [217.69.76.211]) by mail.0x20.net (Postfix) with ESMTP id 0A4AE6A601C; Thu, 7 Jun 2012 22:35:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at mail.0x20.net Received: from mail.0x20.net ([217.69.76.211]) by mail.0x20.net (mail.0x20.net [217.69.76.211]) (amavisd-new, port 10024) with ESMTP id 42KslAY0uNo8; Thu, 7 Jun 2012 22:35:05 +0200 (CEST) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id B47796A6006; Thu, 7 Jun 2012 22:35:05 +0200 (CEST) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.5/8.14.5) with ESMTP id q57KZ5rs099777; Thu, 7 Jun 2012 22:35:05 +0200 (CEST) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.5/8.14.5/Submit) id q57KZ5I7099317; Thu, 7 Jun 2012 22:35:05 +0200 (CEST) (envelope-from lars) Date: Thu, 7 Jun 2012 22:35:05 +0200 From: Lars Engels To: Andriy Gapon Message-ID: <20120607203505.GG5592@e-new.0x20.net> References: <4FD05C16.9040905@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qCPPoBTQI/bIC4sS" Content-Disposition: inline In-Reply-To: <4FD05C16.9040905@FreeBSD.org> X-Editor: VIM - Vi IMproved 7.3 X-Operation-System: FreeBSD 8.3-RELEASE-p2 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@FreeBSD.org Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 20:35:08 -0000 --qCPPoBTQI/bIC4sS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 07, 2012 at 10:45:26AM +0300, Andriy Gapon wrote: >=20 > It's long been a wish of mine to have an ability to decide at boot time t= hat a > system should boot in "console-only" mode. That is, that no graphics/X > applications like e.g. xdm/kdm/gdm are automatically started even when th= ey are > configured to do so. >=20 > Here is my attempt at implementing that: > https://gitorious.org/~avg/freebsd/avgbsd/commit/96f7051d63d4286ef6f0196d= 241e7855338a6ed7?format=3Dpatch >=20 > All the option does at boot time is setting of 'inhibit_gui' variable for= kernel > environment.=20 I like this idea. rc(8) sets rc_fast=3Dyes when the system boots, so it would be possible to extend the scripts that start a desktop manager can use a code like this: if [ -n "$rc_fast" -a "`kenv inhibit_gui 2> /dev/null`" =3D "1" ]; then echo "Console only mode, $name not started" exit 0 fi Then the user can still start the DM manually by issuing "service $name start". --qCPPoBTQI/bIC4sS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/REHkACgkQKc512sD3afjauACfVCcxcB4tsR6yPcV7ubHSarjD 0J4AoL3uwXXyT5l2qu3K8w/Flm5aCXxu =bwrH -----END PGP SIGNATURE----- --qCPPoBTQI/bIC4sS-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 21:43:28 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C396C1065670 for ; Thu, 7 Jun 2012 21:43:28 +0000 (UTC) (envelope-from rflynn@acsalaska.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 96F248FC16 for ; Thu, 7 Jun 2012 21:43:28 +0000 (UTC) Received: from [127.0.0.1] (squeeze.lan.rachie.is-a-geek.net [192.168.2.30]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id A24B87E861 for ; Thu, 7 Jun 2012 13:43:27 -0800 (AKDT) Message-ID: <4FD1207C.8020907@acsalaska.net> Date: Thu, 07 Jun 2012 23:43:24 +0200 From: Mel Flynn User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: FreeBSD Hackers Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: nss compat shims X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 21:43:28 -0000 Hi, I'm currently implementing support for more NSS databases in net/nss-pamd-ldapd and I've started to wonder why there's only the group and password support in lib/libc/net/nss_compat.c? Is there a specific reason for it or is this a classic case of "patches welcome"? I wasn't able to determine the reason from the commit log. -- Mel From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 8 05:51:55 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 344581065674 for ; Fri, 8 Jun 2012 05:51:55 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id E4D058FC14 for ; Fri, 8 Jun 2012 05:51:54 +0000 (UTC) Received: by obcni5 with SMTP id ni5so2486648obc.13 for ; Thu, 07 Jun 2012 22:51:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:from:date:message-id:subject:to:content-type; bh=LoJQqo/fVT7TUNy+tW69Rw6p9J3nsTv8nJQTporvw+c=; b=MqIqvhQ19FPruk0ZSXXBgcJZGc48xDu7stZBPfUEABkeYtRJbmun50trUncZ3V0wwT mx2FwpPCHNdzOFvhgMTHm3OKNZmLCS9eBWFzBDvpf0gG0SE01OtXmXApL7OFcyVqqlyT oTt6lS62zBkZdW0p909rBuTfrpqTrbJb3hhVM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :x-gm-message-state; bh=LoJQqo/fVT7TUNy+tW69Rw6p9J3nsTv8nJQTporvw+c=; b=Jr3yT40wyKf+yKm31wFXCZfjGuvQYqUlu2kN50SEjKbBFPqPi9dEwX/GEq6Fzn25rW pxsU+xp43Pn5umWx5gSbX9OoG08+XBuGgZHEcqEYxeUkh2grCFuWZHJwbjxuHrut2qVQ huXDYC/D3NPFReUj/shSWIn8c1K5oZr6Q7qv1DTxLND/Fi4JK/cWEAJOQbbwTX5xcbLb FGYpWE8xfnnDmszF7gXPs8eFZ8vyCj12Zsl2aTd+EJrOphZrbZiqWx8Tw/+m5lB8vR8F VxEG2yP17hkEavO34LQKYxB8AZjP4yJ5iw2RzTXjvwpdufl8GTd3WnqlavJEBj+vhclP w94g== Received: by 10.182.2.193 with SMTP id 1mr4812067obw.46.1339134714185; Thu, 07 Jun 2012 22:51:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.204.69 with HTTP; Thu, 7 Jun 2012 22:51:23 -0700 (PDT) From: Eitan Adler Date: Fri, 8 Jun 2012 01:51:23 -0400 Message-ID: To: FreeBSD Hackers Content-Type: multipart/mixed; boundary=f46d04451747f2092c04c1ef9835 X-Gm-Message-State: ALoCoQluo0W1glCS3ILbZsDqZxWKwu4f0YcLOOoRJW2bR6+f/INHO2JTPc+kjfCqiWr6gs2gq35C Subject: disabling generic attach for hptrr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 05:51:55 -0000 --f46d04451747f2092c04c1ef9835 Content-Type: text/plain; charset=UTF-8 I was sent this patch by a user that has been having trouble with his hardware until attach_generic was disabled in loader.conf. Is there any reason to have this on by default? Would anyone object to me committing this patch? -- Eitan Adler --f46d04451747f2092c04c1ef9835 Content-Type: application/octet-stream; name="freebsd-9.0-disable-hptrr-generic-attach.patch" Content-Disposition: attachment; filename="freebsd-9.0-disable-hptrr-generic-attach.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h36tw7ia0 ZGlmZiAtdXBOciBhL3NoYXJlL21hbi9tYW40L2hwdHJyLjQgYi9zaGFyZS9tYW4vbWFuNC9ocHRy ci40DQotLS0gYS9zaGFyZS9tYW4vbWFuNC9ocHRyci40CTIwMTItMDYtMDQgMDE6MDQ6MjMuNjAz MjYyMjk5IC0wNDAwDQorKysgYi9zaGFyZS9tYW4vbWFuNC9ocHRyci40CTIwMTItMDYtMDQgMDE6 MTM6MjkuOTgzMjE4ODY2IC0wNDAwDQpAQCAtNTAsOCArNTAsOCBAQCBocHRycl9sb2FkPSJZRVMi DQogVGhlIGZvbGxvd2luZyB0dW5hYmxlcyBhcmUgc2V0dGFibGUgZnJvbSB0aGUgbG9hZGVyOg0K IC5CbCAtb2hhbmcNCiAuSXQgVmEgaHcuaHB0cnIuYXR0YWNoX2dlbmVyaWMNCi1zZXQgdG8gMCB0 byBkZW55IGRyaXZlciBhdHRhY2ggdG8gY2hpcHMgd2l0aCBnZW5lcmljIE1hcnZlbGwgKG5vbi1I aWdoUG9pbnQpDQotUENJIGlkZW50aWZpY2F0aW9uLiBUaGVzZSBjaGlwcyBhcmUgYWxzbyBzdXBw b3J0ZWQgYnkgYXRhKDQpLg0KK3NldCB0byAxIHRvIHBlcm1pdCBkcml2ZXIgYXR0YWNoIHRvIGNo aXBzIHdpdGggZ2VuZXJpYyBNYXJ2ZWxsIChub24tSGlnaFBvaW50KQ0KK1BDSSBpZGVudGlmaWNh dGlvbi4gVGhlc2UgY2hpcHMgYXJlIGFsc28gc3VwcG9ydGVkIGJ5IGF0YSg0KSBhbmQgbXZzKDQp Lg0KIFNvbWUgdmVuZG9ycyBhcmUgdXNpbmcgc2FtZSBjaGlwcywgYnV0IHdpdGhvdXQgcHJvdmlk aW5nIFJBSUQgQklPUy4NCiAuRWwNCiAuU2ggREVTQ1JJUFRJT04NCkBAIC0xMTIsNyArMTEyLDgg QEAgVGhpcyBkcml2ZXIgc3VwZXJzZWRlcyB0aGUgb2xkZXIgcnIyMzJ4DQogLlhyIGF0YSA0ICwN CiAuWHIgY2FtIDQgLA0KIC5YciBocHRtdiA0ICwNCi0uWHIgbG9hZGVyIDgNCisuWHIgbG9hZGVy IDggLA0KKy5YciBtdnMgNA0KIC5TaCBISVNUT1JZDQogVGhlDQogLk5tDQpkaWZmIC11cE5yIGEv c3lzL2Rldi9ocHRyci9ocHRycl9vc21fYnNkLmMgYi9zeXMvZGV2L2hwdHJyL2hwdHJyX29zbV9i c2QuYw0KLS0tIGEvc3lzL2Rldi9ocHRyci9ocHRycl9vc21fYnNkLmMJMjAxMi0wNi0wNCAwMDo0 MTo1Ny4zODcwMTE3NjcgLTA0MDANCisrKyBiL3N5cy9kZXYvaHB0cnIvaHB0cnJfb3NtX2JzZC5j CTIwMTItMDYtMDQgMDE6MDg6MzcuMTEzMjk5NzI4IC0wNDAwDQpAQCAtMzQsNyArMzQsNyBAQA0K ICNpbmNsdWRlIDxkZXYvaHB0cnIvb3NfYnNkLmg+DQogI2luY2x1ZGUgPGRldi9ocHRyci9ocHRp bnRmLmg+DQogDQotc3RhdGljIGludCBhdHRhY2hfZ2VuZXJpYyA9IDE7DQorc3RhdGljIGludCBh dHRhY2hfZ2VuZXJpYyA9IDA7DQogVFVOQUJMRV9JTlQoImh3LmhwdHJyLmF0dGFjaF9nZW5lcmlj IiwgJmF0dGFjaF9nZW5lcmljKTsNCiANCiBzdGF0aWMgaW50IGhwdF9wcm9iZShkZXZpY2VfdCBk ZXYpDQo= --f46d04451747f2092c04c1ef9835-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 8 07:21:00 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEDD81065670; Fri, 8 Jun 2012 07:21:00 +0000 (UTC) (envelope-from j.mckeown@ru.ac.za) Received: from mail.ru.ac.za (mail.ru.ac.za [IPv6:2001:4200:1010:0:250:56ff:fe8d:5]) by mx1.freebsd.org (Postfix) with ESMTP id C3B378FC0A; Fri, 8 Jun 2012 07:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ru.ac.za; s=ru-msa; h=X-Authenticated-User:Message-Id:Content-Type:MIME-Version:Date:Subject:To:From; bh=W+K1M+/rI/63bM9JFTjnK3V4xaSLxBtNSmrO9Vc66TQ=; b=XcOZgBHBVnHQLMmHg4AfUMXm2taz7HQRDgok7HuLAHx1OQsDcTyzlZ8+8SytKtkFr2l5ZyYjeRTfAeHlTrQpAbSjgTfBlypZWfPabFtq6wmHHHqHnTNwDUwJXDF+4ciJ; Received: from vorkosigan.ru.ac.za ([2001:4200:1010:1058:219:d1ff:fe9f:a932]:64085) by mail.ru.ac.za with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1SctVB-000KH1-6I; Fri, 08 Jun 2012 09:20:57 +0200 From: Jonathan McKeown Organization: Rhodes University To: freebsd-hackers@freebsd.org Date: Fri, 8 Jun 2012 09:20:56 +0200 User-Agent: KMail/1.9.10 References: <4FD0C1F4.2060108@FreeBSD.org> In-Reply-To: <4FD0C1F4.2060108@FreeBSD.org> X-Face: $@VrUx^RHy/}yu]jKf/<4T%/d|F+$j-Ol2"2J$q+%OK1]&/G_S9(=?utf-8?q?HkaQ*=60!=3FYOK=3FY!=27M=60C=0A=09aP=5C9nVPF8Q=7DCilHH8l=3B=7E!4?= =?utf-8?q?2HK6=273lg4J=7Daz?=@1Dqqh:J]M^"YPn*2IWrZON$1+G?oX3@ =?utf-8?q?k=230=0A=0954XDRg=3DYn=5FF-etwot4U=24b?=dTS{i X-Virus-Scanned: mail.ru.ac.za (2001:4200:1010:0:250:56ff:fe8d:5) X-Authenticated-User: s0900137 from vorkosigan.ru.ac.za (2001:4200:1010:1058:219:d1ff:fe9f:a932) using auth_plaintext Cc: "Alexander V. Chernikov" , net@freebsd.org Subject: Re: ifconfig accepting hostname as ipv4 address X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 07:21:00 -0000 On Thursday 07 June 2012 17:00:04 Alexander V. Chernikov wrote: > Hello list! > > Since the early days ifconfig(8) has the following functionality: [hostname in place of literal address] > Moreover, ifconfig em0 some_valid_fqdn/MASK silently ignores it, so you > can't set valid CIDR address using this notation. I'm not sure that's true. Have you tried it? Because it seems to work here. Jonathan From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 8 07:43:38 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B5598106566C; Fri, 8 Jun 2012 07:43:38 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4DA4A8FC16; Fri, 8 Jun 2012 07:43:38 +0000 (UTC) Received: from v6.mpls.in ([2a02:978:2::5] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1SctrG-0005br-30; Fri, 08 Jun 2012 11:43:46 +0400 Message-ID: <4FD1AD1D.4050308@FreeBSD.org> Date: Fri, 08 Jun 2012 11:43:25 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120121 Thunderbird/9.0 MIME-Version: 1.0 To: Jonathan McKeown References: <4FD0C1F4.2060108@FreeBSD.org> <201206080920.56986.j.mckeown@ru.ac.za> In-Reply-To: <201206080920.56986.j.mckeown@ru.ac.za> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, net@freebsd.org Subject: Re: ifconfig accepting hostname as ipv4 address X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 07:43:38 -0000 On 08.06.2012 11:20, Jonathan McKeown wrote: > On Thursday 07 June 2012 17:00:04 Alexander V. Chernikov wrote: >> Hello list! >> >> Since the early days ifconfig(8) has the following functionality: > > [hostname in place of literal address] > >> Moreover, ifconfig em0 some_valid_fqdn/MASK silently ignores it, so you >> can't set valid CIDR address using this notation. > > I'm not sure that's true. Have you tried it? Because it seems to work here. Strangely enough, it works on another machine. Ok, this one works and can unfortunately be used by other people. However, original question remains. > > Jonathan > From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 8 09:04:29 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66521106564A; Fri, 8 Jun 2012 09:04:29 +0000 (UTC) (envelope-from j.mckeown@ru.ac.za) Received: from mail.ru.ac.za (mail.ru.ac.za [IPv6:2001:4200:1010:0:250:56ff:fe8d:5]) by mx1.freebsd.org (Postfix) with ESMTP id 20BA68FC17; Fri, 8 Jun 2012 09:04:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ru.ac.za; s=ru-msa; h=X-Authenticated-User:Message-Id:Content-Type:MIME-Version:Date:Subject:To:From; bh=yTKndxVMfoM9Zn9bGD55SCM8l0ginloRz8/Y0GbDkZY=; b=DOaBrGpeqs20IFtmT5LaPKtS3B/wEw76QycGe7wTVGs395R4lm+xBrfO+B5Kkj9B/ixS/ixShvoscqFA4On3oXGVDSaZmUdMiXsR/bEaAzGL9Vl0RXbBqfLwwhy+Wk2H; Received: from vorkosigan.ru.ac.za ([2001:4200:1010:1058:219:d1ff:fe9f:a932]:58928) by mail.ru.ac.za with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1Scv7J-0004Is-2O; Fri, 08 Jun 2012 11:04:25 +0200 From: Jonathan McKeown Organization: Rhodes University To: freebsd-hackers@freebsd.org Date: Fri, 8 Jun 2012 11:04:24 +0200 User-Agent: KMail/1.9.10 References: <4FD0C1F4.2060108@FreeBSD.org> <201206080920.56986.j.mckeown@ru.ac.za> <4FD1AD1D.4050308@FreeBSD.org> In-Reply-To: <4FD1AD1D.4050308@FreeBSD.org> X-Face: $@VrUx^RHy/}yu]jKf/<4T%/d|F+$j-Ol2"2J$q+%OK1]&/G_S9(=?utf-8?q?HkaQ*=60!=3FYOK=3FY!=27M=60C=0A=09aP=5C9nVPF8Q=7DCilHH8l=3B=7E!4?= =?utf-8?q?2HK6=273lg4J=7Daz?=@1Dqqh:J]M^"YPn*2IWrZON$1+G?oX3@ =?utf-8?q?k=230=0A=0954XDRg=3DYn=5FF-etwot4U=24b?=dTS{i X-Virus-Scanned: mail.ru.ac.za (2001:4200:1010:0:250:56ff:fe8d:5) X-Authenticated-User: s0900137 from vorkosigan.ru.ac.za (2001:4200:1010:1058:219:d1ff:fe9f:a932) using auth_plaintext Cc: "Alexander V. Chernikov" , net@freebsd.org Subject: Re: ifconfig accepting hostname as ipv4 address X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 09:04:29 -0000 On Friday 08 June 2012 09:43:25 Alexander V. Chernikov wrote: > On 08.06.2012 11:20, Jonathan McKeown wrote: > > On Thursday 07 June 2012 17:00:04 Alexander V. Chernikov wrote: > >> Hello list! > >> > >> Since the early days ifconfig(8) has the following functionality: > > > > [hostname in place of literal address] > > > >> Moreover, ifconfig em0 some_valid_fqdn/MASK silently ignores it, so you > >> can't set valid CIDR address using this notation. > > > > I'm not sure that's true. Have you tried it? Because it seems to work > > here. > > Strangely enough, it works on another machine. Ok, this one works and > can unfortunately be used by other people. > > However, original question remains. So your question is, do we want to keep the behaviour of being able to configure an interface by hostname as well as by IP address? My vote is yes. Sure, a typo in the parameters to ifconfig can cause problems under some circumstances. So can a typo in any command. I don't think that's a good enough reason to remove functionality you regard as ``unfortunate''. We find it useful, and a significant aid to maintainability and readability of configuration files. From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 8 12:48:56 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D819106564A; Fri, 8 Jun 2012 12:48:56 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-gh0-f182.google.com (mail-gh0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id DC7D58FC14; Fri, 8 Jun 2012 12:48:55 +0000 (UTC) Received: by ghbz22 with SMTP id z22so1369709ghb.13 for ; Fri, 08 Jun 2012 05:48:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=7zuoG7SX99GWXYiF5UKAXhMbkqdGPNarShIJwynVtHw=; b=0H7CNxeosK+NoreYJAsKPgeRDnE+icL1BhbJsvD2ltqlztPv+R7A90N2khUDrUMAU6 hC4QgLyW+TZkzBbGFEGEfU/GsJ4mmSNSZCrjFE08tfy82NandY+vLZCE9qaikTYmfkBZ +OmxCQvo0KHcYwjvFD5BbIlOK9f77+qEq84BjHLQBAc0l3KTg0Qv7cCVUnqi7knJe+9e wng53YqU7bwRAOxfXJiisbCVKOYnsNeZgMp16nkKzUDW/ESWOoQDfwKvx+JPhXwg8W+g GNXeVrqaydUTZhLA9KBHgBmubfyhdIJUZRd5fJHaoU6/RDRYFT09JwLlMYp+en6+oTKJ EW7Q== MIME-Version: 1.0 Received: by 10.236.114.169 with SMTP id c29mr6608068yhh.108.1339159735270; Fri, 08 Jun 2012 05:48:55 -0700 (PDT) Received: by 10.236.46.233 with HTTP; Fri, 8 Jun 2012 05:48:55 -0700 (PDT) Date: Fri, 8 Jun 2012 14:48:55 +0200 Message-ID: From: Oliver Pinter To: jasone@freebsd.org, freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: [Phrack Mag.] The false kingdom of jemalloc, or On exploiting the jemalloc memory manager X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 12:48:56 -0000 An analysis of jemalloc - founded in phrack magazine. --[ Table of contents 1 - Introduction 1.1 - Thousand-faced jemalloc 2 - jemalloc memory allocator overview 2.1 - Basic structures 2.1.1 - Chunks (arena_chunk_t) 2.1.2 - Arenas (arena_t) 2.1.3 - Runs (arena_run_t) 2.1.4 - Regions/Allocations 2.1.5 - Bins (arena_bin_t) 2.1.6 - Huge allocations 2.1.7 - Thread caches (tcache_t) 2.1.8 - Unmask jemalloc 2.2 - Algorithms 3 - Exploitation tactics 3.1 - Adjacent region corruption 3.2 - Heap manipulation 3.3 - Metadata corruption 3.3.1 - Run (arena_run_t) 3.3.2 - Chunk (arena_chunk_t) 3.3.3 - Thread caches (tcache_t) 4 - A real vulnerability 5 - Future work 6 - Conclusion 7 - References 8 - Code [...] "--[ 6 - Conclusion We have done the first step in analyzing jemalloc. We do know, however, that we have not covered every possible potential of corrupting the allocator in a controllable way. We hope to have helped those that were about to study the FreeBSD userspace allocator or the internals of Firefox but wanted to have a first insight before doing so. Any reader that discovers mistakes in our article is advised to contact us as soon as possible and let us know. Many thanks to the Phrack staff for their comments. Also, thanks to George Argyros for reviewing this work and making insightful suggestions. Finally, we would like to express our respect to Jason Evans for such a leet allocator. No, that isn't ironic; jemalloc is, in our opinion, one of the best (if not the best) allocators out there. " http://www.phrack.org/archives/68/p68_0x0a_Pseudomonarchia%20jemallocum_by_argp%20&%20huku.txt http://www.phrack.org/archives/68/p68_0x0d_The%20Art%20of%20Exploitation:%20Exploiting%20VLC,%20a%20jemalloc%20case%20study_by_huku%20&%20argp.txt From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 8 13:12:43 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25F531065670; Fri, 8 Jun 2012 13:12:43 +0000 (UTC) (envelope-from aled.w.morris@googlemail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 32CD28FC08; Fri, 8 Jun 2012 13:12:41 +0000 (UTC) Received: by laai10 with SMTP id i10so1507198laa.13 for ; Fri, 08 Jun 2012 06:12:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=u1yRo9s8LKE7+a+4tfZNdVQ9vctWpfpnX7OhO2JAt2Q=; b=MscTDse3cNvUh3ruM4ejrJrQgcCG8IzZT/9V829KmF/IapEavc3S5M7GvQyBKJVPNP fA4TDW3MX+CBo7IKwuzI5uM97DutWAJcyafSa5Y4FcR8Phx/guuxCh0yzXkSdtInkyB9 iqTbtRtKeC3dgn0bFAp/LqHdko434Z7BBxM5Bih8awiPoPHw2qzYGg0UYjSUn6D9jZod bL85GtaspfQPY9ZnCnUKb4kBRGEv16ryu0e+LFT4b3Hc2y5Ro2jqcXqKYYJJPt2cQejP H89rAmxlNUJ/4naZaFUC2WtJSUFl3jmwU1YotEwyTdBhAXPkJMoMYUjaO0hgsnIEmZ0N veQg== MIME-Version: 1.0 Received: by 10.112.49.227 with SMTP id x3mr3964012lbn.73.1339161160987; Fri, 08 Jun 2012 06:12:40 -0700 (PDT) Sender: aled.w.morris@googlemail.com Received: by 10.112.43.200 with HTTP; Fri, 8 Jun 2012 06:12:40 -0700 (PDT) In-Reply-To: References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> <20120607095741.GA1361@reks> <4FD0BAC6.6000304@FreeBSD.org> Date: Fri, 8 Jun 2012 14:12:40 +0100 X-Google-Sender-Auth: ry48Vt0XtzAWS33M7WOKVsCqgs0 Message-ID: From: Aled Morris To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Konstantin Belousov , freebsd-hackers@freebsd.org, Gleb Kurtsou , Doug Barton , Andriy Gapon Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 13:12:43 -0000 On 7 June 2012 16:12, Garrett Cooper wrote: > I've run into _multiple_ scenarios where this isn't possible because > the terminal settings are screwed up in single user mode, and had to > resort to `sed -i '' `. > > ed is the standard text editor Aled From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 8 14:33:03 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C3701065673; Fri, 8 Jun 2012 14:33:03 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id D0D928FC08; Fri, 8 Jun 2012 14:33:02 +0000 (UTC) Received: by bkvi18 with SMTP id i18so2323646bkv.13 for ; Fri, 08 Jun 2012 07:33:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=7jdJe1ISJAURwH2B9FYJXkNIHAg4WHuPf4Sj6W0NNJQ=; b=TbcUUFGDZKJ4yNmSH/BMyiwaDfO3GrU1SqFsgdQ+9Q9DypsHNXjDR8MB1K1O1Jy90K CCLJO+u6HOOPJFQ62dLDlKdCVjKcaNMZKujJhBV45nxo5aifu/kihL0CKU0AHpp5/6XL ATshFLk47W+X5AP/Mr8aqOxM+4YdNv+IELGWjWNefv323VERMsEIdESu2P79LpnowgRG YQuz43QyxWLcVG2ilUYhhFUJV90NQKxzV0vgAq0zrgfrbMrs4JpZhTULfAAHHEkeLsqL kEj6hZG6KsOQru+V/neNLnUg2nSukCUWn7E/+cV/RwLLSUKLiidiRQnqLHfFU/zZZT5e L/Mw== Received: by 10.204.152.196 with SMTP id h4mr3903990bkw.131.1339165981709; Fri, 08 Jun 2012 07:33:01 -0700 (PDT) Received: from DOMYPC ([82.193.208.173]) by mx.google.com with ESMTPS id e20sm7852625bkv.10.2012.06.08.07.32.57 (version=SSLv3 cipher=OTHER); Fri, 08 Jun 2012 07:32:59 -0700 (PDT) Message-ID: <20120608.143300.329.2@DOMY-PC> From: rank1seeker@gmail.com To: "John Baldwin" , hackers@freebsd.org Date: Fri, 08 Jun 2012 16:33:00 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: <201206071116.33215.jhb@freebsd.org> References: <20120606.161514.685.1@DOMY-PC> <201206070821.40068.jhb@freebsd.org> <20120607.135825.592.1@DOMY-PC> <201206071116.33215.jhb@freebsd.org> X-Mailer: POP Peeper (3.8.1.0) Cc: Subject: Re: CD bootcode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 14:33:03 -0000 ----- Original Message -----=0D=0AFrom: John Baldwin = =0D=0ATo: rank1seeker@gmail.com=0D=0ACc: = hackers@freebsd.org=0D=0ADate: Thu, 7 Jun 2012 11:16:33 = -0400=0D=0ASubject: Re: CD bootcode=0D=0A=0D=0A> On Thursday, June 07, = 2012 9:58:25 am rank1seeker@gmail.com wrote:=0D=0A> > ----- Original = Message -----=0D=0A> > From: John Baldwin =0D=0A> > To: = freebsd-hackers@freebsd.org=0D=0A> > Cc: rank1seeker@gmail.com=0D=0A> > = Date: Thu, 7 Jun 2012 08:21:39 -0400=0D=0A> > Subject: Re: CD = bootcode=0D=0A=0D=0A> > But even when loader is finally started, loader = handles symlinks on UFS (kicked by '/boot/boot'), BUT fails so, on = Rock-Ridge iso (kicked by =0D=0A> '/boot/cdboot')=0D=0A> > Looks like = loader must be made into looking at Rock-Ridge extensions.=0D=0A> =0D=0A> = It is src/lib/libstand/cd9660.c that would have to be patched. It = already has=0D=0A> limited Rock-Ridge support, so adding symlink support = to cd9660_open() may not=0D=0A> be that hard to do.=0D=0A> =0D=0A> -- = =0D=0A> John Baldwin=0D=0A=0D=0A=0D=0AProblem should be solved in 2 = groups/steps.=0D=0A=0D=0AFirst=0D=0A-----=0D=0Astage 2 boot '/boot/boot' = AND '/boot/cdboot' shouldn't be made into working with = symlinks.=0D=0AJust leave them, the way they are. First one can be = navigated to loader via 'boot.config' file.=0D=0ASo only '/boot/cdboot' = should be edited, to react to the same 'boot.config' file as '/boot/boot' = does.=0D=0ASimply because they both target 'loader', 'boot.config' should = work for both bootcodes.=0D=0A=0D=0ASecond=0D=0A------=0D=0A'loader' = should be edited, to work with Rock-Ridge = extensions.=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6 From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 8 15:08:27 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32FEA1065672 for ; Fri, 8 Jun 2012 15:08:27 +0000 (UTC) (envelope-from thomas@gibfest.dk) Received: from mail.tyknet.dk (mail.tyknet.dk [IPv6:2a01:4f8:141:52a3:186::]) by mx1.freebsd.org (Postfix) with ESMTP id B5F848FC12 for ; Fri, 8 Jun 2012 15:08:26 +0000 (UTC) Received: from [10.10.1.100] (unknown [217.71.4.82]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.tyknet.dk (Postfix) with ESMTPSA id 78BB5948FD for ; Fri, 8 Jun 2012 17:08:25 +0200 (CEST) X-DKIM: OpenDKIM Filter v2.4.1 mail.tyknet.dk 78BB5948FD DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gibfest.dk; s=default; t=1339168105; bh=2JMSvdTkE31jVSAby/ZlTcQ6O6N363Sf4oPxEndmpEA=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=dkNA4EjYnerRwy0gIS10Q3NoBh78b5f//G0InDvnPpcIdC2/E49BtXzKy1BDrZQDY K5zgnTCq/Lj1hdqaHWm8Nd2jjNv7G36YcQUcV5LM3sUUXWJhfMSEZ95bxtamULEYw/ T8cGgfho8wLwGoVP2wHIHbpgQGqCbzxQLswebqwo= Message-ID: <4FD23187.9090404@gibfest.dk> Date: Fri, 08 Jun 2012 19:08:23 +0200 From: Thomas Rasmussen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120604 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4FD0C1F4.2060108@FreeBSD.org> <201206080920.56986.j.mckeown@ru.ac.za> <4FD1AD1D.4050308@FreeBSD.org> <201206081104.24765.j.mckeown@ru.ac.za> In-Reply-To: <201206081104.24765.j.mckeown@ru.ac.za> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: ifconfig accepting hostname as ipv4 address X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 15:08:27 -0000 On 08.06.2012 11:04, Jonathan McKeown wrote: > We find it useful, and a significant aid to maintainability and readability > of configuration files. Hello, What happens if your server reboots while the DNS server is down/unavailable ? This seems to be a bad idea for the same reasons that putting hostnames in firewall configs are a bad idea: You want the system to boot and work correctly regardless of whether the systems DNS servers were responsive at boot time or not. Best regards Thomas Steen Rasmussen From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 8 15:21:36 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E7B01065674 for ; Fri, 8 Jun 2012 15:21:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id D8FD18FC12 for ; Fri, 8 Jun 2012 15:21:35 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 31C65B981; Fri, 8 Jun 2012 11:21:35 -0400 (EDT) From: John Baldwin To: rank1seeker@gmail.com Date: Fri, 8 Jun 2012 11:18:29 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <20120606.161514.685.1@DOMY-PC> <201206071116.33215.jhb@freebsd.org> <20120608.143300.329.2@DOMY-PC> In-Reply-To: <20120608.143300.329.2@DOMY-PC> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1250" Content-Transfer-Encoding: 7bit Message-Id: <201206081118.29399.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 08 Jun 2012 11:21:35 -0400 (EDT) Cc: hackers@freebsd.org Subject: Re: CD bootcode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 15:21:36 -0000 On Friday, June 08, 2012 10:33:00 am rank1seeker@gmail.com wrote: > ----- Original Message ----- > From: John Baldwin > To: rank1seeker@gmail.com > Cc: hackers@freebsd.org > Date: Thu, 7 Jun 2012 11:16:33 -0400 > Subject: Re: CD bootcode > > > On Thursday, June 07, 2012 9:58:25 am rank1seeker@gmail.com wrote: > > > ----- Original Message ----- > > > From: John Baldwin > > > To: freebsd-hackers@freebsd.org > > > Cc: rank1seeker@gmail.com > > > Date: Thu, 7 Jun 2012 08:21:39 -0400 > > > Subject: Re: CD bootcode > > > > But even when loader is finally started, loader handles symlinks on UFS (kicked by '/boot/boot'), BUT fails so, on Rock-Ridge iso (kicked by > > '/boot/cdboot') > > > Looks like loader must be made into looking at Rock-Ridge extensions. > > > > It is src/lib/libstand/cd9660.c that would have to be patched. It already has > > limited Rock-Ridge support, so adding symlink support to cd9660_open() may not > > be that hard to do. > > > > -- > > John Baldwin > > > Problem should be solved in 2 groups/steps. > > First > ----- > stage 2 boot '/boot/boot' AND '/boot/cdboot' shouldn't be made into working with symlinks. > Just leave them, the way they are. First one can be navigated to loader via 'boot.config' file. > So only '/boot/cdboot' should be edited, to react to the same 'boot.config' file as '/boot/boot' does. > Simply because they both target 'loader', 'boot.config' should work for both bootcodes. Adding /boot.config support to cdboot is non-trivial. Also, cdboot is intended for read-only media, so dynamic configuration via a file is not quite as useful. > Second > ------ > 'loader' should be edited, to work with Rock-Ridge extensions. It already supports RR for names, it is merely symlink support that has to be added. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 8 16:11:34 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24E9F106564A; Fri, 8 Jun 2012 16:11:34 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6CE198FC08; Fri, 8 Jun 2012 16:11:33 +0000 (UTC) Received: by bkvi18 with SMTP id i18so2429765bkv.13 for ; Fri, 08 Jun 2012 09:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=WPKDj+37Vn5mJPfWOqh+ClPThLDtnQ1hEGBKxPGh6so=; b=d3PsErRXM+68ebYnsUYIu6pq5thE+N/SwberXGsuk6+CpoZ4sELLN8D/ODKWTxh5jV 7GQQwV/9I5jVGhdFlRCn4pyK4exwS5naf6utGVwrbPYs3ytJyCAwvbLLrZp6WKCHvPOG cRA0zuzozcnb8rxca+t9uu/JQOzOsCJ0dLiAsE9IhWE+S66/jVBoLh1Gy+8DycydiCZo 1VvIiHK4siBcBgMhB5XmpPbNGn9atmicOpc05hazYL7bxNRILOxnalIQFuym3wUUcN5O fb4PZnATrhkgRFF3ZP055KO8z/9VNZ6IFcvRGPyN0gs8q69/xbpqhVKjYhT6ZC087U18 CABA== Received: by 10.204.157.144 with SMTP id b16mr6644453bkx.12.1339171892278; Fri, 08 Jun 2012 09:11:32 -0700 (PDT) Received: from DOMYPC ([82.193.208.173]) by mx.google.com with ESMTPS id e20sm8179359bkv.10.2012.06.08.09.11.20 (version=SSLv3 cipher=OTHER); Fri, 08 Jun 2012 09:11:30 -0700 (PDT) Message-ID: <20120608.161129.283.3@DOMY-PC> From: rank1seeker@gmail.com To: "John Baldwin" , hackers@freebsd.org Date: Fri, 08 Jun 2012 18:11:29 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: <201206081118.29399.jhb@freebsd.org> References: <20120606.161514.685.1@DOMY-PC> <201206071116.33215.jhb@freebsd.org> <20120608.143300.329.2@DOMY-PC> <201206081118.29399.jhb@freebsd.org> X-Mailer: POP Peeper (3.8.1.0) Cc: Subject: Re: CD bootcode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 16:11:34 -0000 > > First=0D=0A> > -----=0D=0A> > stage 2 boot '/boot/boot' AND = '/boot/cdboot' shouldn't be made into working with symlinks.=0D=0A> > = Just leave them, the way they are. First one can be navigated to loader = via 'boot.config' file.=0D=0A> > So only '/boot/cdboot' should be edited, = to react to the same 'boot.config' file as '/boot/boot' does.=0D=0A> > = Simply because they both target 'loader', 'boot.config' should work for = both bootcodes.=0D=0A> =0D=0A> Adding /boot.config support to cdboot is = non-trivial. Also, cdboot is=0D=0A> intended for read-only media, so = dynamic configuration via a file is not=0D=0A> quite as = useful.=0D=0A=0D=0Acdboot is a FreeBSD specific=0D=0AFact that it is = intended for RO media is irrelevant here, as stage 2 boot can also = reside on RO fs.=0D=0A=0D=0AFor cdboot, 'boot.config' file should give = instructions of full path to loader, nothing else (no other, stage 2 = boot's flags/functionality).=0D=0AHm, then again, if cdboot file would = inherit just that 1 functionality, then it can't share same config = file.=0D=0AHow about 'cdboot.config' file name?=0D=0A=0D=0AThanks to = boot.config, I specify full path to loader, so '/boot/boot' isn't = "halted" by symlink.=0D=0AIf cdboot would obey it in a same way, I = wouldn't have to patch it, by adding third path.=0D=0A=0D=0A=0D=0ADomagoj = Smol=E8i=E6 From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 8 20:06:29 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34FFB1065672 for ; Fri, 8 Jun 2012 20:06:29 +0000 (UTC) (envelope-from realbushman@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id DF8A98FC1B for ; Fri, 8 Jun 2012 20:06:28 +0000 (UTC) Received: by qcsg15 with SMTP id g15so1250985qcs.13 for ; Fri, 08 Jun 2012 13:06:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=LH/YEUZ0ynrZA4/kvK4qTiTR/fHBtkkqpAsX1RuJsNs=; b=zc62pHHk1O9J8gqrk/peZxlnGMXU55fW29deRAB3gwbGYOqUu0E9HePnUbqMADZVIS IBlvVmDIQltPNehdU7+N2JY8IjPWE/ppbpWw0MWmKdzaUstwe/zp72GULU950Md+x6E5 su/P+btXD8td9AqFetjNrLS5utB/sEpmhwlkZne+GBSWrSZqq1AjS9+xc592qGF0++3K nBOZYu0phaBQftncyL8LVx8ecGGrRlAgjfc42FUR67lf4x96hQuvwA+Ok8yswV7FEZm5 rbLgtRamph46dRMdWrv3b7/2aJ6E8jaAvDgcJea8yBMbcTDzc7LWxBdrvGm8ZX2iFOyy QTXA== MIME-Version: 1.0 Received: by 10.224.199.6 with SMTP id eq6mr8426146qab.90.1339185988134; Fri, 08 Jun 2012 13:06:28 -0700 (PDT) Sender: realbushman@gmail.com Received: by 10.229.96.18 with HTTP; Fri, 8 Jun 2012 13:06:28 -0700 (PDT) In-Reply-To: <4FD1207C.8020907@acsalaska.net> References: <4FD1207C.8020907@acsalaska.net> Date: Fri, 8 Jun 2012 13:06:28 -0700 X-Google-Sender-Auth: G6TYvC93IX4QiA_fdDMQ6dnJaGc Message-ID: From: Michael Bushkov To: Mel Flynn Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Hackers Subject: Re: nss compat shims X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 20:06:29 -0000 I don't know for sure, but it seems that there was no need to support anything besides groups and password when nss_compat.c was committed. At that time, IIRC, the modules that we had in ports supported only these databases. -- Michael On Thu, Jun 7, 2012 at 2:43 PM, Mel Flynn wrote: > Hi, > > I'm currently implementing support for more NSS databases in > net/nss-pamd-ldapd and I've started to wonder why there's only the group > and password support in lib/libc/net/nss_compat.c? > > Is there a specific reason for it or is this a classic case of "patches > welcome"? I wasn't able to determine the reason from the commit log. > -- > Mel > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 8 21:28:02 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F2116106567B for ; Fri, 8 Jun 2012 21:28:02 +0000 (UTC) (envelope-from brodbd@uw.edu) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id B1EC48FC0A for ; Fri, 8 Jun 2012 21:28:02 +0000 (UTC) Received: by obcni5 with SMTP id ni5so3785904obc.13 for ; Fri, 08 Jun 2012 14:28:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding:x-gm-message-state; bh=Ey5GW+kICLbAnV2IN1BHBMVviOomNKGePMMIYEvHVT0=; b=dqGs+ZZr6YHnTq45Z6OheoKJpLtlcDBZckhhX4ZjWp6ICrOKXXsDRwkiFBYJLxkvQb W1PgyIkBaov3X6Bc5VWg0UUTrXo2lVIkhZkORbPJ8Ih9Pc0UiZhZnvEePkYt8clRrRBW NR29A8s5Os0MW7Zh1uOb0vGaLkZF2zb6p7opQp0hB7YaLHaKWamhF9HNuALgXLkFwX9A hlfM93AyjvNW1KXwed6LkQI3NpFw1Uve5T/l9GZ1+wv73j6VMDSub3TyVFKLajJFBjJB wCFanBgmO6w5IoKZkUBtGolJnl9ljG+mrhaYO7ReAazDQbaTMUJG/gs5AxxsbzzNbuw3 pJ8w== MIME-Version: 1.0 Received: by 10.182.2.233 with SMTP id 9mr8652521obx.59.1339190882017; Fri, 08 Jun 2012 14:28:02 -0700 (PDT) Received: by 10.182.204.33 with HTTP; Fri, 8 Jun 2012 14:28:01 -0700 (PDT) In-Reply-To: <4FD23187.9090404@gibfest.dk> References: <4FD0C1F4.2060108@FreeBSD.org> <201206080920.56986.j.mckeown@ru.ac.za> <4FD1AD1D.4050308@FreeBSD.org> <201206081104.24765.j.mckeown@ru.ac.za> <4FD23187.9090404@gibfest.dk> Date: Fri, 8 Jun 2012 14:28:01 -0700 Message-ID: From: David Brodbeck To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQmR8cNimAe8vktAVMNSHyM9hfviOi/V99m9179gJU3rv0p9MyYWw5kv3uJFP2YDeVb7fTXE Subject: Re: ifconfig accepting hostname as ipv4 address X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 21:28:03 -0000 On Fri, Jun 8, 2012 at 10:08 AM, Thomas Rasmussen wrote= : > On 08.06.2012 11:04, Jonathan McKeown wrote: >> >> We find it useful, and a significant aid to maintainability and >> readability >> of configuration files. > > Hello, > > What happens if your server reboots while the DNS > server is down/unavailable ? Shouldn't this still work if the machine has its own hostname associated with its IP in /etc/hosts? Is that not still common practice? I can see the logic here. By putting the IP in /etc/hosts and the hostname in the ifconfig, you only have to edit the address in one place if it ever changes. This reminds me that the old (pre-NWAM) way to configure Solaris with a static IP was to put the IP and hostname in /etc/hosts, the hostname in /etc/hostname.e1000g0 (or whatever your interface name was), the gateway address in /etc/defaultrouter, and the network address and netmask in /etc/netmasks. --=20 David Brodbeck System Administrator,=A0Linguistics University of Washington From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 01:16:40 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B5298106566C for ; Sat, 9 Jun 2012 01:16:40 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5954C8FC08 for ; Sat, 9 Jun 2012 01:16:40 +0000 (UTC) Received: by yenl8 with SMTP id l8so1958476yen.13 for ; Fri, 08 Jun 2012 18:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; bh=XaKVDXc0Xs2GTQGDqNqbP+TFbU/KcGm+QRA6/GwsSQM=; b=S4s6flz5fUas0gqRFkwCIfDxQmWvlnwlM8mhMaxunUGlGeM20Lx7T6LiG3aW9BcJe4 bBKNFFButo1js6QDew6WeWYdjt6VftW6DEgl2uQxfD6+GOZY01sqFBgHgCkc9QvrW7nk NX0DPdcTKELeVR36frmGCZIuxXmZzrb+2Jprw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:x-gm-message-state; bh=XaKVDXc0Xs2GTQGDqNqbP+TFbU/KcGm+QRA6/GwsSQM=; b=TXR/BY3IIQV99784MjTA9ry31hprMo4C+sOhxX2p9lxRW3SemXuVWC0WlrjRzFhVdp nuuNCOuCbraEBN2CpIMzA5Yfm8fhYqgHQR4hK3Re8NKSEKuWLvZLCzTwy9g2wib8MbfA xeQs+Hp/ItpW92xIRu6pM2jQA6FOgPH+pqYLE4l/kWfc9kssmGrEdr34q1Avl/E6aNqw nNLxs89dt8hr77mRqThuAiKak9+LqHn5pm5v1bZkmV5oomVpRXVLrhO3FttYgAWFQAKL +N+oWWZ2kLrHxCR+kSBZKqZ17C5s78jLMXEKXYxo0Qry/mwPBBdt3o/pjqTzzEWWveKQ CCsg== Received: by 10.236.191.138 with SMTP id g10mr9950276yhn.25.1339204594154; Fri, 08 Jun 2012 18:16:34 -0700 (PDT) Received: from DataIX.net (75-128-120-86.dhcp.aldl.mi.charter.com. [75.128.120.86]) by mx.google.com with ESMTPS id g4sm27186526yhf.12.2012.06.08.18.16.32 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jun 2012 18:16:33 -0700 (PDT) Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id q591GVka074315 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Jun 2012 21:16:31 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Received: (from jh@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id q591GUU8074314; Fri, 8 Jun 2012 21:16:30 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Date: Fri, 8 Jun 2012 21:16:30 -0400 From: Jason Hellenthal To: Andriy Gapon Message-ID: <20120609011630.GA48866@DataIX.net> References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> <20120607095741.GA1361@reks> <4FD07D11.9030002@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FD07D11.9030002@FreeBSD.org> X-Gm-Message-State: ALoCoQk6rgeTPpyalUu3XTPTjgVM0EbKA/Kt74ZPi7MoI4949R0pCJ2m/vTsMeTSYBgqhTpgVW9J Cc: Konstantin Belousov , freebsd-hackers@freebsd.org, Gleb Kurtsou Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 01:16:40 -0000 On Thu, Jun 07, 2012 at 01:06:09PM +0300, Andriy Gapon wrote: > on 07/06/2012 12:57 Gleb Kurtsou said the following: > > What do you think about adding generic support for overriding *_enable > > options in rc.conf? > > > > I'd like to be able to disable services at boot prompt, e.g. > > # set rc.slim_enable="no" -- overrides slim_enable="yes" in rc.conf > > > > Similarly rc.pf_enable="no" > > > > Then introduce x_enable knob (=yes by default) to disable login > > managers. User will be able to override this setting with > > # service xdm forcestart > > I think that this is an excellent idea. > runlevel support might be a better solution so it does not differ that much from what other systems do and would be easy for people to grasp. -- - (2^(N-1)) From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 04:29:03 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FF681065672 for ; Sat, 9 Jun 2012 04:29:03 +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 B05B88FC12 for ; Sat, 9 Jun 2012 04:29:02 +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 HAA08345; Sat, 09 Jun 2012 07:28:53 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SdDIC-000LXc-SE; Sat, 09 Jun 2012 07:28:53 +0300 Message-ID: <4FD2D102.4070103@FreeBSD.org> Date: Sat, 09 Jun 2012 07:28:50 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: Jason Hellenthal References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> <20120607095741.GA1361@reks> <4FD07D11.9030002@FreeBSD.org> <20120609011630.GA48866@DataIX.net> In-Reply-To: <20120609011630.GA48866@DataIX.net> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 04:29:03 -0000 on 09/06/2012 04:16 Jason Hellenthal said the following: > runlevel support might be a better solution so it does not differ that > much from what other systems do and would be easy for people to grasp. Patches are welcome, as always. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 07:22:27 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 156C11065670 for ; Sat, 9 Jun 2012 07:22:27 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id BC0318FC0C for ; Sat, 9 Jun 2012 07:22:08 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q597LlVh084691 for ; Sat, 9 Jun 2012 09:21:47 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q597LZef084635 for ; Sat, 9 Jun 2012 09:21:47 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 9 Jun 2012 09:21:35 +0200 (CEST) From: Wojciech Puchar To: freebsd-hackers@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sat, 09 Jun 2012 09:21:47 +0200 (CEST) Subject: wired memory - again! X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 07:22:27 -0000 top reports wired memory 128MB WHERE it is used? below results of vmstat -m and vmstat -z values does not sum up even to half of it FreeBSD 9 - few days old. What i am missing and why there are SO MUCH wired memory on 1GB machine without X11 or virtualbox Type InUse MemUse HighUse Requests Size(s) hhook 2 1K - 2 128 entropy 1024 64K - 1024 64 ithread 79 13K - 80 32,128,256 prison_racct 1 1K - 1 512 acpiintr 1 1K - 1 64 acpica 1475 144K - 40951 16,32,64,128,256,512,1024 KTRACE 100 13K - 100 128 pci_link 16 2K - 16 32,128 linker 173 182K - 222 16,32,64,128,256,512,1024,2048,4096 lockf 29 4K - 43890 64,128,256 loginclass 2 1K - 798 64 temp 39 12K - 5630768 16,32,64,128,256,512,1024,2048,4096 devbuf 5877 8954K - 6191 16,32,64,128,256,512,1024,2048,4096 cache 1 1K - 1 32 acpitask 1 2K - 1 2048 module 190 24K - 190 128 hdaa 5 36K - 5 1024,2048 mtx_pool 2 16K - 2 hdac 1 1K - 1 1024 hdacc 1 1K - 1 32 osd 2 1K - 2 16,64 pmchooks 1 1K - 1 128 subproc 975 715K - 3179367 512,4096 proc 2 2K - 2 1024 session 24 3K - 919 128 pgrp 33 5K - 6485 128 cred 102 16K - 16668512 64,256 uidinfo 8 2K - 823 128,256 plimit 23 6K - 30450 256 agp 1 1K - 8 32,128 CAM periph 6 2K - 26 16,32,64,128,256 sysctltmp 0 0K - 129246 16,32,64,128 sysctloid 3473 171K - 3663 16,32,64,128 sysctl 0 0K - 412154 16,32,64 tidhash 1 2K - 1 2048 callout 3 192K - 3 umtx 2712 339K - 2784 128 p1003.1b 1 1K - 1 16 SWAP 2 1097K - 2 64 CAM XPT 47 25K - 320 16,32,64,128,256,1024,2048 bus-sc 75 254K - 845 16,32,64,128,256,512,1024,2048 bus 569 53K - 3061 16,32,64,128,256,1024 devstat 4 9K - 4 32,4096 eventhandler 73 6K - 73 64,128 kobj 118 472K - 184 4096 feeder 20 2K - 95 32,128 Per-cpu 1 1K - 1 32 ata_pci 2 1K - 2 64 acpisem 17 3K - 17 128 scsi_cd 0 0K - 4 16 rman 184 21K - 594 16,32,128 sbuf 1 1K - 565 16,32,64,128,256,512,1024,2048,4096 drm_drawable 0 0K - 3 64 stack 0 0K - 2 256 taskqueue 17 2K - 17 16,32,128 Unitno 29 2K - 2679811 32,64 iov 0 0K - 3495764 16,32,64,128,256,512,1024,2048,4096 select 1038 130K - 1039 128 ioctlops 0 0K - 4852031 16,32,64,128,256,512,1024,2048,4096 msg 4 398K - 4 2048 sem 4 106K - 4 2048,4096 shm 1 20K - 74 2048 tty 8 8K - 66 512,1024 pts 3 1K - 59 256 mbuf_tag 0 0K - 18887 32,64 shmfd 1 8K - 1 mixer 3 12K - 3 4096 pcb 20 13K - 10587 16,32,1024,2048,4096 soname 15 2K - 47317 16,32,64,128 acl 0 0K - 100159 4096 biobuf 42 84K - 69042 2048 vfscache 1 512K - 1 cl_savebuf 0 0K - 46771 64,128,256,512,1024,2048 vfs_hash 1 256K - 1 vnodes 3 1K - 66 64,256 drm_ctxbitmap 1 4K - 1 4096 mount 197 9K - 484 16,32,64,128,256 vnodemarker 0 0K - 113570 512 BPF 14 10K - 14 128,512,4096 ether_multi 9 1K - 46 16,64 ifaddr 38 13K - 70 32,512,4096 ifnet 10 19K - 10 128,2048 drm_agplists 1 1K - 1 128 clone 4 16K - 4 4096 arpcom 2 1K - 2 16 lltable 11 5K - 46 256,512 drm_buflists 0 0K - 2 32 tun 1 1K - 1 256 drm_files 0 0K - 23 64 routetbl 24 4K - 601 32,64,128,256,512 igmp 9 3K - 9 256 USBdev 20 2K - 28 64,128 USB 35 12K - 57 16,32,128,256,2048 in_multi 3 1K - 19 256 dummynet 3 3K - 3 512,1024 IpFw/IpAcct 13 4K - 52 16,32,64,128,1024 ipfw_tbl 32 8K - 63 256 hostcache 1 28K - 1 syncache 1 96K - 1 crypto 2 1K - 22 64,256,512 jblocks 4 1K - 16 128,256,512,1024,2048,4096 savedino 0 0K - 5805809 256 sbdep 0 0K - 10373 64 jsegdep 340 22K - 7475178 64 jseg 62 8K - 170559 128 jfreefrag 0 0K - 591990 128 jnewblk 0 0K - 4241276 128 jmvref 0 0K - 23952 128 jremref 0 0K - 1216370 128 jaddref 1 1K - 1425542 128 freedep 0 0K - 8584 64 freework 1 1K - 1367172 32,128 newdirblk 37 3K - 74515 64 dirrem 0 0K - 1107286 128 mkdir 39 5K - 138568 128 diradd 268 34K - 1286974 128 freefile 0 0K - 968251 64 freeblks 0 0K - 934882 128 freefrag 0 0K - 591990 128 indirdep 0 0K - 49210 128 newblk 69 81K - 4241277 256 bmsafemap 3 9K - 64162 256 inodedep 711 611K - 2032643 512 pagedep 48 76K - 178501 256 ufs_dirhash 223 48K - 63994 16,32,64,128,256,512,1024,2048 ufs_mount 6 21K - 12 512,2048 vm_pgdata 2 129K - 2 128 UMAHash 3 7K - 8 512,1024,2048,4096 drm_maps 1 1K - 12 128 DEVFS1 78 39K - 169 512 DEVFS3 187 47K - 324 256 DEVFS2 78 2K - 130 16 DEVFS 35 1K - 39 16,128 DEVFSP 1 1K - 24 64 pfs_nodes 73 19K - 73 256 memdesc 1 4K - 7 32,4096 pfs_vncache 0 0K - 5 64 tmpfs name 21 1K - 31018 16,32,64 atkbddev 2 1K - 2 64 tmpfs mount 4 1K - 4 128 drm_magic 0 0K - 10 32 drm_driver 4 5K - 9 16,32,64,128,512,4096 drm_sarea 1 1K - 2 16,32 drm_dma 1 1K - 1 32 kbdmux 6 18K - 6 16,512,1024,2048 eli data 0 0K - 20213 64,256,512,1024,2048,4096 GEOM 46 17K - 335 16,64,128,256,512,1024,2048,4096 CAM dev queue 4 1K - 6 128 linux 15 1K - 15 64 isadev 3 1K - 3 128 apmdev 1 1K - 1 128 scsi_da 0 0K - 18 16 madt_table 0 0K - 1 4096 CAM queue 16 1K - 120 16,32 CAM SIM 4 1K - 6 256 cdev 9 3K - 9 256 acpidev 35 3K - 35 64 io_apic 1 2K - 1 2048 sigio 1 1K - 3 64 filedesc 94 86K - 3189517 16,32,512,1024,2048,4096 MCA 5 1K - 5 128 msi 2 1K - 2 128 nexusdev 4 1K - 4 16 kenv 52 11K - 65 16,32,64,128 kqueue 16 18K - 13798 256,512,2048 proc-args 43 3K - 3170288 16,32,64,128,256 iprtheap 46 4K - 966 32,64,128,256,512,1024,2048,4096 nullfs_node 11 1K - 107914259 32 nullfs_hash 1 1K - 1 128 nullfs_mount 5 1K - 5 16 fdesc_mount 1 1K - 1 16 ITEM SIZE LIMIT USED FREE REQ FAIL SLEEP UMA Kegs: 208, 0, 89, 13, 89, 0, 0 UMA Zones: 896, 0, 89, 3, 89, 0, 0 UMA Slabs: 568, 0, 2369, 4, 995403, 0, 0 UMA RCntSlabs: 568, 0, 1682, 54, 18888, 0, 0 UMA Hash: 256, 0, 0, 0, 3, 0, 0 16 Bucket: 152, 0, 23, 127, 165, 0, 0 32 Bucket: 280, 0, 75, 65, 406, 1, 0 64 Bucket: 536, 0, 94, 18, 689, 57, 0 128 Bucket: 1048, 0, 1360, 2, 78740,139422, 0 VM OBJECT: 232, 0, 4818, 9470,46723263, 0, 0 MAP: 232, 0, 7, 25, 7, 0, 0 KMAP ENTRY: 120, 35185, 58, 593, 1969532, 0, 0 MAP ENTRY: 120, 0, 1365, 6478,98960238, 0, 0 fakepg: 120, 0, 0, 32984, 32844, 0, 0 mt_zone: 4112, 0, 241, 55, 241, 0, 0 16: 16, 0, 1894, 962, 4305691, 0, 0 32: 32, 0, 1672, 853,111636817, 0, 0 64: 64, 0, 4426, 17022,22069803, 0, 0 128: 128, 0, 8754, 66443,17168392, 0, 0 256: 256, 0, 1115, 8245,18863934, 0, 0 512: 512, 0, 1959, 11208, 5342044, 0, 0 1024: 1024, 0, 47, 297, 2122535, 0, 0 2048: 2048, 0, 112, 694, 206638, 0, 0 4096: 4096, 0, 255, 769, 3319798, 0, 0 Files: 80, 0, 151, 1019,64748703, 0, 0 TURNSTILE: 136, 0, 1357, 103, 1393, 0, 0 umtx pi: 96, 0, 0, 0, 0, 0, 0 racct: 168, 0, 75, 871, 3180078, 0, 0 rctl_rule_link: 32, 0, 0, 0, 0, 0, 0 rctl_rule: 80, 0, 0, 0, 0, 0, 0 PROC: 1184, 0, 64, 845, 3178456, 0, 0 THREAD: 1128, 0, 963, 393, 7647, 0, 0 SLEEPQUEUE: 80, 0, 1357, 151, 1393, 0, 0 VMSPACE: 392, 0, 47, 873, 3178424, 0, 0 cpuset: 72, 0, 70, 230, 78, 0, 0 mbuf_packet: 256, 0, 256, 745, 2860232, 0, 0 mbuf: 256, 0, 1, 1143, 6150499, 0, 0 mbuf_cluster: 2048, 25600, 1001, 1101, 84992, 0, 0 mbuf_jumbo_page: 4096, 12800, 0, 631, 659168, 0, 0 mbuf_jumbo_9k: 9216, 6400, 0, 0, 0, 0, 0 mbuf_jumbo_16k: 16384, 3200, 0, 0, 0, 0, 0 mbuf_ext_refcnt: 4, 0, 0, 0, 0, 0, 0 ttyinq: 160, 0, 195, 1101, 3015, 0, 0 ttyoutq: 256, 0, 101, 634, 1549, 0, 0 g_bio: 232, 0, 0, 1296,31129051, 0, 0 ata_request: 328, 0, 0, 552, 9343998, 0, 0 ata_composite: 336, 0, 0, 0, 0, 0, 0 cryptop: 88, 0, 0, 0, 0, 0, 0 cryptodesc: 72, 0, 0, 0, 0, 0, 0 VNODE: 480, 0, 8662, 2010,114445551, 0, 0 VNODEPOLL: 112, 0, 4, 161, 144, 0, 0 NAMEI: 1024, 0, 0, 648,127664920, 0, 0 S VFS Cache: 108, 0, 8417, 2242,19906281, 0, 0 STS VFS Cache: 148, 0, 0, 0, 0, 0, 0 L VFS Cache: 328, 0, 277, 1127, 210806, 0, 0 LTS VFS Cache: 368, 0, 0, 0, 0, 0, 0 DIRHASH: 1024, 0, 512, 632, 126318, 0, 0 Mountpoints: 792, 0, 16, 14, 18, 0, 0 pipe: 728, 0, 13, 697, 1429592, 0, 0 ksiginfo: 112, 0, 901, 782, 1162616, 0, 0 itimer: 344, 0, 0, 22, 1, 0, 0 KNOTE: 128, 0, 46, 331, 154025, 0, 0 socket: 680, 25602, 55, 257, 15655, 0, 0 ipq: 56, 819, 0, 0, 0, 0, 0 udp_inpcb: 392, 25600, 2, 238, 8389, 0, 0 udpcb: 16, 25704, 2, 670, 8389, 0, 0 tcp_inpcb: 392, 25600, 10, 190, 3348, 0, 0 tcpcb: 976, 25600, 10, 186, 3348, 0, 0 tcptw: 72, 5150, 0, 300, 704, 0, 0 syncache: 152, 15375, 0, 125, 500, 0, 0 hostcache: 136, 15372, 5, 135, 233, 0, 0 tcpreass: 40, 1680, 0, 1260, 83437, 0, 0 sackhole: 32, 0, 0, 505, 53, 0, 0 ripcb: 392, 25600, 1, 49, 11, 0, 0 unpcb: 240, 25600, 41, 215, 3703, 0, 0 rtentry: 200, 0, 10, 85, 114, 0, 0 IPFW dynamic rule: 120, 0, 0, 0, 0, 0, 0 divcb: 392, 25600, 0, 0, 0, 0, 0 selfd: 56, 0, 1320, 822,48631163, 0, 0 SWAPMETA: 288, 116519, 1817, 15096, 164969, 0, 0 FFS inode: 168, 0, 8608, 1996, 6497423, 0, 0 FFS1 dinode: 128, 0, 0, 0, 0, 0, 0 FFS2 dinode: 256, 0, 8608, 1967, 6496808, 0, 0 TMPFS dirent: 40, 0, 17, 823, 3864, 0, 0 TMPFS node: 224, 0, 18, 492, 3858, 0, 0 TMPFS dirent: 40, 0, 2, 418, 22, 0, 0 TMPFS node: 224, 0, 3, 82, 23, 0, 0 TMPFS dirent: 40, 0, 2, 586, 26836, 0, 0 TMPFS node: 224, 0, 3, 303, 26837, 0, 0 TMPFS dirent: 40, 0, 0, 420, 204, 0, 0 TMPFS node: 224, 0, 1, 84, 205, 0, 0 From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 07:23:19 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45D1E1065674; Sat, 9 Jun 2012 07:23:19 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id ADC278FC1C; Sat, 9 Jun 2012 07:23:18 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q597NFJP086312; Sat, 9 Jun 2012 09:23:15 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q597NFsN086303; Sat, 9 Jun 2012 09:23:15 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 9 Jun 2012 09:23:15 +0200 (CEST) From: Wojciech Puchar To: "Alexander V. Chernikov" In-Reply-To: <4FD0C1F4.2060108@FreeBSD.org> Message-ID: References: <4FD0C1F4.2060108@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sat, 09 Jun 2012 09:23:15 +0200 (CEST) Cc: hackers@freebsd.org, net@freebsd.org Subject: Re: ifconfig accepting hostname as ipv4 address X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 07:23:19 -0000 > input. > Moreover, ifconfig em0 some_valid_fqdn/MASK silently ignores it, so you can't > set valid CIDR address using this notation. > > Classful era has ended more than 10 years ago, do we still want to keep this > behavior? > were not aware of that option, and it is rather stupid option - you should work on addresses not names when configuring network From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 07:31:24 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F0EC106564A; Sat, 9 Jun 2012 07:31:24 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5B0588FC1B; Sat, 9 Jun 2012 07:31:23 +0000 (UTC) Received: by werg1 with SMTP id g1so1297683wer.13 for ; Sat, 09 Jun 2012 00:31:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=GdEVPEx+pGecMPsokEJKGTkC5kHlcjab3KvZ2gfFFSw=; b=YqT5/rNIn2jd5XDfrVnNQdy12GenWBDD1lmVTEAauzo4OUOUsBOb2FdE5u2nAFQaGD G9VEdRYEsSjUF6Tr/sGubvJvdgbGqwGHjfXaGlQ+syUvS/WqXGw9nAr724T8kd+h0OyV UuJYIzBMuRLb24c8BqHAeTpWcUolCty2X6f0sZVuk9tQrILF5/101rEFU2yOtdwDMXHB xcKUKzHN4XEjST51YBLfr6k2tT0aBykcxoa1uvJYprKeDziyuJKymn7Qz9KOpXHrkMfx RL/mBYgLWJ95y/Q8gjFNCOD+XQWLuvFpu0luWeDUHfb68AZhr3jNjBzWQ+/QivkFXJfr fwcg== Received: by 10.216.209.95 with SMTP id r73mr2899496weo.157.1339227082361; Sat, 09 Jun 2012 00:31:22 -0700 (PDT) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id f19sm11213373wiw.11.2012.06.09.00.31.19 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 09 Jun 2012 00:31:20 -0700 (PDT) From: Mikolaj Golub To: Ivan Voras References: X-Comment-To: Ivan Voras Sender: Mikolaj Golub Date: Sat, 09 Jun 2012 10:31:17 +0300 In-Reply-To: (Ivan Voras's message of "Fri, 1 Jun 2012 14:54:48 +0200") Message-ID: <86sje5kkl6.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alan Cox , Wojciech Puchar , Robert Watson , Kostik Belousov , freebsd-hackers@freebsd.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 07:31:24 -0000 On Fri, 1 Jun 2012 14:54:48 +0200 Ivan Voras wrote: IV> On 1 June 2012 14:35, Wojciech Puchar wrote: >>> http://people.freebsd.org/~ivoras/stuff/spsurvey.py ... IV> If anyone posts more data, I'll analyse it. I'm more worried about the IV> granularity of procstat, where it marks the entire region if a single IV> superpage exists in it - it means any such analysis is only IV> approximate. Here is a patch (for kernel and procstat) that allows to see amount of pages mapped to superpages. http://people.freebsd.org/~trociny/procstat-superpages.cnt.1.patch Not sure it is useful enough to be committed. -- Mikolaj Golub From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 07:37:14 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05B591065670; Sat, 9 Jun 2012 07:37:14 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id A55198FC08; Sat, 9 Jun 2012 07:37:13 +0000 (UTC) Received: by obcni5 with SMTP id ni5so4550949obc.13 for ; Sat, 09 Jun 2012 00:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=BIbKVZwsjALX8L8FMYJ1qJ2GLI4GRYSrpEZQO9wlPc8=; b=ukcMo2UjTyuOWUUVd5obvojPz43flDn7DGZVJNnWRnkSN/uzCBs+gTjeHgY2yceuj/ SRsRJkAroJn65+GglzXTZbFjTUpMu+mS2Hr189kzH79OQM3fvQ0CVvVgV5+4Jo5zmURv IoW70qKRZNa4ZBy/00OWWUxH088k0yFDI9LFp/RStDjBnbkXY39Ca3aNpdi8vPdbKioN zaOQU44xuMChDpS2JFwurnLA6sLIB5Svk/64MtELux0t23ZTDJpBjY8vr/wTtByneR0Q AM1bQ7tIe45ZsdAMoy2u0+GL2eOQEM3baAHgC+dsCTlgAQKat8QxCtSCkv2EPYUPsm74 sQzQ== MIME-Version: 1.0 Received: by 10.182.154.67 with SMTP id vm3mr9799878obb.57.1339227433145; Sat, 09 Jun 2012 00:37:13 -0700 (PDT) Received: by 10.76.98.77 with HTTP; Sat, 9 Jun 2012 00:37:13 -0700 (PDT) In-Reply-To: References: <4FD0C1F4.2060108@FreeBSD.org> Date: Sat, 9 Jun 2012 00:37:13 -0700 Message-ID: From: Garrett Cooper To: Wojciech Puchar Content-Type: text/plain; charset=ISO-8859-1 Cc: hackers@freebsd.org, "Alexander V. Chernikov" , net@freebsd.org Subject: Re: ifconfig accepting hostname as ipv4 address X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 07:37:14 -0000 On Sat, Jun 9, 2012 at 12:23 AM, Wojciech Puchar wrote: >> input. >> Moreover, ifconfig em0 some_valid_fqdn/MASK silently ignores it, so you >> can't set valid CIDR address using this notation. >> >> Classful era has ended more than 10 years ago, do we still want to keep >> this behavior? >> > were not aware of that option, and it is rather stupid option - you should > work on addresses not names when configuring network I agree that it's not the best configuration in the world, as it would only work 100% if a machine had proper DNS records or a definitive hosts file. There are already enough bugs with static IP configurations and hostnames as-is *I'm looking at you mountlate* -- no sense to introduce more potentially buggy interoperability that only works in a handful of niche cases. Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 08:38:34 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87E8A1065700; Sat, 9 Jun 2012 08:38:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 000B38FC12; Sat, 9 Jun 2012 08:38:32 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q598cMLb044670; Sat, 9 Jun 2012 11:38:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q598cMqE055134; Sat, 9 Jun 2012 11:38:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q598cMpl055133; Sat, 9 Jun 2012 11:38:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 9 Jun 2012 11:38:22 +0300 From: Konstantin Belousov To: Mikolaj Golub Message-ID: <20120609083822.GJ85127@deviant.kiev.zoral.com.ua> References: <86sje5kkl6.fsf@kopusha.home.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qhD8kUEc5MK9MdKG" Content-Disposition: inline In-Reply-To: <86sje5kkl6.fsf@kopusha.home.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Alan Cox , Wojciech Puchar , Robert Watson , Ivan Voras , freebsd-hackers@freebsd.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 08:38:34 -0000 --qhD8kUEc5MK9MdKG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 09, 2012 at 10:31:17AM +0300, Mikolaj Golub wrote: >=20 > On Fri, 1 Jun 2012 14:54:48 +0200 Ivan Voras wrote: >=20 > IV> On 1 June 2012 14:35, Wojciech Puchar wrote: > >>> http://people.freebsd.org/~ivoras/stuff/spsurvey.py >=20 > ... >=20 > IV> If anyone posts more data, I'll analyse it. I'm more worried about t= he > IV> granularity of procstat, where it marks the entire region if a single > IV> superpage exists in it - it means any such analysis is only > IV> approximate. >=20 > Here is a patch (for kernel and procstat) that allows to see amount of pa= ges > mapped to superpages. >=20 > http://people.freebsd.org/~trociny/procstat-superpages.cnt.1.patch >=20 > Not sure it is useful enough to be committed. Superpage aggregates mappings for several normal-sized pages. As a consequence, when you iterate over small pages in sysctl_kern_proc_vmmap(), you account each superpage as many time as much constituent small pages it contains. --qhD8kUEc5MK9MdKG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/TC34ACgkQC3+MBN1Mb4hc4QCfSIxNSXxqps0HBccBbXYQfv+X opcAnRoP7eT+az82ghZZm+3HwUNnjdAX =Hxjs -----END PGP SIGNATURE----- --qhD8kUEc5MK9MdKG-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 09:03:49 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AD9F6106567B; Sat, 9 Jun 2012 09:03:49 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id B64FD8FC16; Sat, 9 Jun 2012 09:03:48 +0000 (UTC) Received: by wibhj8 with SMTP id hj8so1059069wib.13 for ; Sat, 09 Jun 2012 02:03:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=v+Nat3nuth7NIDcataR3wySj720Ci2AIkYh4h2bIdpc=; b=k1FLcdOXq7pOuUfIYr5rl7PlPGV8EQafvZc6AaoXMRICHMw09o8LtBhxlqrhK2tJJ6 VnBTpnoqZcxxDXVdbGr/17p85MjLhyQvlpkNvRhhev0/OSju7C8pX6XWXtb7tp74UCSE s4xZsE2OJeggp8993L5jnugcRZs5jthVCpPI9/ZeRCdTHaLwAykTJ82dW+TQ8qo4XNPK EgHV4YFsSAqh0On8RGMcjx19FFinfwmHuSgxTB26JjJu50gd2orm3jyv4eTqJyEI0Qwi NTcr9BCIs0Z+dBwZC5PdDqTUrhPATU38A3bGGiSGoEm8aknNJFZBDHxZmb95/co/nli7 fSCw== Received: by 10.180.83.196 with SMTP id s4mr6689670wiy.15.1339232627558; Sat, 09 Jun 2012 02:03:47 -0700 (PDT) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id n6sm12099650wie.7.2012.06.09.02.03.45 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 09 Jun 2012 02:03:46 -0700 (PDT) From: Mikolaj Golub To: Konstantin Belousov References: <86sje5kkl6.fsf@kopusha.home.net> <20120609083822.GJ85127@deviant.kiev.zoral.com.ua> X-Comment-To: Konstantin Belousov Sender: Mikolaj Golub Date: Sat, 09 Jun 2012 12:03:43 +0300 In-Reply-To: <20120609083822.GJ85127@deviant.kiev.zoral.com.ua> (Konstantin Belousov's message of "Sat, 9 Jun 2012 11:38:22 +0300") Message-ID: <86obosluvk.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alan Cox , Wojciech Puchar , Robert Watson , Ivan Voras , freebsd-hackers@freebsd.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 09:03:49 -0000 On Sat, 9 Jun 2012 11:38:22 +0300 Konstantin Belousov wrote: KB> On Sat, Jun 09, 2012 at 10:31:17AM +0300, Mikolaj Golub wrote: >> >> On Fri, 1 Jun 2012 14:54:48 +0200 Ivan Voras wrote: >> >> IV> On 1 June 2012 14:35, Wojciech Puchar wrote: >> >>> http://people.freebsd.org/~ivoras/stuff/spsurvey.py >> >> ... >> >> IV> If anyone posts more data, I'll analyse it. I'm more worried about the >> IV> granularity of procstat, where it marks the entire region if a single >> IV> superpage exists in it - it means any such analysis is only >> IV> approximate. >> >> Here is a patch (for kernel and procstat) that allows to see amount of pages >> mapped to superpages. >> >> http://people.freebsd.org/~trociny/procstat-superpages.cnt.1.patch >> >> Not sure it is useful enough to be committed. KB> Superpage aggregates mappings for several normal-sized pages. KB> As a consequence, when you iterate over small pages in KB> sysctl_kern_proc_vmmap(), you account each superpage as many time as KB> much constituent small pages it contains. This is exactly what my intention was to count: how much memory are handled by superpages (using normal-sized page as a measurement unit), not amount of superpages. And I think this is what Ivan wanted to know. Do you think it is better to return number of superpages? -- Mikolaj Golub From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 09:07:44 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81C79106566B; Sat, 9 Jun 2012 09:07:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 194E28FC15; Sat, 9 Jun 2012 09:07:43 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q5997eCR052098; Sat, 9 Jun 2012 12:07:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q5997ekU055330; Sat, 9 Jun 2012 12:07:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q5997eKV055329; Sat, 9 Jun 2012 12:07:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 9 Jun 2012 12:07:40 +0300 From: Konstantin Belousov To: Mikolaj Golub Message-ID: <20120609090740.GL85127@deviant.kiev.zoral.com.ua> References: <86sje5kkl6.fsf@kopusha.home.net> <20120609083822.GJ85127@deviant.kiev.zoral.com.ua> <86obosluvk.fsf@kopusha.home.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vkzoT2Bc9VsM/9ev" Content-Disposition: inline In-Reply-To: <86obosluvk.fsf@kopusha.home.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Alan Cox , Wojciech Puchar , Robert Watson , Ivan Voras , freebsd-hackers@freebsd.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 09:07:44 -0000 --vkzoT2Bc9VsM/9ev Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 09, 2012 at 12:03:43PM +0300, Mikolaj Golub wrote: >=20 > On Sat, 9 Jun 2012 11:38:22 +0300 Konstantin Belousov wrote: >=20 > KB> On Sat, Jun 09, 2012 at 10:31:17AM +0300, Mikolaj Golub wrote: > >>=20 > >> On Fri, 1 Jun 2012 14:54:48 +0200 Ivan Voras wrote: > >>=20 > >> IV> On 1 June 2012 14:35, Wojciech Puchar wrote: > >> >>> http://people.freebsd.org/~ivoras/stuff/spsurvey.py > >>=20 > >> ... > >>=20 > >> IV> If anyone posts more data, I'll analyse it. I'm more worried abo= ut the > >> IV> granularity of procstat, where it marks the entire region if a s= ingle > >> IV> superpage exists in it - it means any such analysis is only > >> IV> approximate. > >>=20 > >> Here is a patch (for kernel and procstat) that allows to see amount o= f pages > >> mapped to superpages. > >>=20 > >> http://people.freebsd.org/~trociny/procstat-superpages.cnt.1.patch > >>=20 > >> Not sure it is useful enough to be committed. >=20 > KB> Superpage aggregates mappings for several normal-sized pages. > KB> As a consequence, when you iterate over small pages in > KB> sysctl_kern_proc_vmmap(), you account each superpage as many time as > KB> much constituent small pages it contains. >=20 > This is exactly what my intention was to count: how much memory are handl= ed by > superpages (using normal-sized page as a measurement unit), not amount of > superpages. And I think this is what Ivan wanted to know. Do you think it= is > better to return number of superpages? >=20 Well, if I see a report informing me that some 2M region contains 512 super pages, how should I interpret it ? For me, it is only one superpage (mappin= g) that can be created in one 2M region. --vkzoT2Bc9VsM/9ev Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/TElwACgkQC3+MBN1Mb4jaTgCdH1mYx2sqVHLz4D8yon9TSpFX rGoAoNDIlr8KQGNDXLL/2nLZROLqgNM8 =LXsu -----END PGP SIGNATURE----- --vkzoT2Bc9VsM/9ev-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 09:46:58 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F5E7106566C; Sat, 9 Jun 2012 09:46:58 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 226B88FC0A; Sat, 9 Jun 2012 09:46:56 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id g1so1354125wer.13 for ; Sat, 09 Jun 2012 02:46:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=6PrMMs6amnIrNuBIbVyZGNXTMdItJrsNJJZksA4c6Kg=; b=FCH98CUTUKqLl7g82egbYxDIpvKsh/ISJNvroMSHzEHPRwyl6rS3Q2rRzeENI8BPma 8BaBgHtRLzPyU17edti0/N90l7kvSEhJRAwlO3MY3LNVHCfAwZnfkjhsbwIJr6P+v0cB WTgZXgLUrF26Pu1oltFhEWsPPiw9V4RTfDr8NMY/eTSTJ3VaixiMApjnDh1/lgt6bZUH 3Xbfr1BmXju0m/YmWEPnhiYdv65v+qsmYm9wupzE+SqA0zj5PrThcb6O4YGoFVvCNJFL YD4lZd/D54Y0ACN23WJ2edCQ7e48jC2SyJDOMW/NpoXZ6pchND2KNzVuLd423l0ai/B6 wK1g== Received: by 10.180.92.65 with SMTP id ck1mr6882318wib.14.1339235216689; Sat, 09 Jun 2012 02:46:56 -0700 (PDT) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id ei4sm12507619wid.5.2012.06.09.02.46.54 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 09 Jun 2012 02:46:55 -0700 (PDT) From: Mikolaj Golub To: Konstantin Belousov References: <86sje5kkl6.fsf@kopusha.home.net> <20120609083822.GJ85127@deviant.kiev.zoral.com.ua> <86obosluvk.fsf@kopusha.home.net> <20120609090740.GL85127@deviant.kiev.zoral.com.ua> X-Comment-To: Konstantin Belousov Sender: Mikolaj Golub Date: Sat, 09 Jun 2012 12:46:53 +0300 In-Reply-To: <20120609090740.GL85127@deviant.kiev.zoral.com.ua> (Konstantin Belousov's message of "Sat, 9 Jun 2012 12:07:40 +0300") Message-ID: <86k3zglsvm.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alan Cox , Wojciech Puchar , Robert Watson , Ivan Voras , freebsd-hackers@freebsd.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 09:46:58 -0000 On Sat, 9 Jun 2012 12:07:40 +0300 Konstantin Belousov wrote: KB> Well, if I see a report informing me that some 2M region contains 512 super KB> pages, how should I interpret it ? For me, it is only one superpage (mapping) KB> that can be created in one 2M region. Well, if I see a report like below: PID START END PRT RES PRES SUP REF SHD FL TP PATH 48568 0x800c00000 0x820c00000 rw- 131072 0 51712 2 0 --S df it tells me that for the region 0x800c00000-0x820c00000 (512Mb) we have 131072 * 4k = 512Mb resident and 51712 * 4k = 202Mb (a litle less than a half of the region) promoted (mapped) to superpages. If I had number of superpages here I would need additional knowledge (a superpage size) to calculate how effectively superpages are used. But actually, no much difference for me. To get a number of superpages is it enough just to divide the result obtained counting normal-sized pages by (2M/4k) factor? -- Mikolaj Golub From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 09:59:33 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D009106566B; Sat, 9 Jun 2012 09:59:33 +0000 (UTC) (envelope-from rwatson@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3DDAB8FC15; Sat, 9 Jun 2012 09:59:33 +0000 (UTC) Received: from [192.168.2.102] (host109-153-160-182.range109-153.btcentralplus.com [109.153.160.182]) by cyrus.watson.org (Postfix) with ESMTPSA id 924EF46B32; Sat, 9 Jun 2012 05:59:31 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: <86k3zglsvm.fsf@kopusha.home.net> Date: Sat, 9 Jun 2012 10:59:28 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <43D7AF1B-9BDB-4417-AF34-E75FB203A2B2@freebsd.org> References: <86sje5kkl6.fsf@kopusha.home.net> <20120609083822.GJ85127@deviant.kiev.zoral.com.ua> <86obosluvk.fsf@kopusha.home.net> <20120609090740.GL85127@deviant.kiev.zoral.com.ua> <86k3zglsvm.fsf@kopusha.home.net> To: Mikolaj Golub X-Mailer: Apple Mail (2.1257) Cc: Konstantin Belousov , Wojciech Puchar , Alan Cox , Ivan Voras , freebsd-hackers@freebsd.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 09:59:33 -0000 On 9 Jun 2012, at 10:46, Mikolaj Golub wrote: > On Sat, 9 Jun 2012 12:07:40 +0300 Konstantin Belousov wrote: >=20 > KB> Well, if I see a report informing me that some 2M region contains = 512 super > KB> pages, how should I interpret it ? For me, it is only one = superpage (mapping) > KB> that can be created in one 2M region. >=20 > Well, if I see a report like below: >=20 > PID START END PRT RES PRES SUP REF = SHD FL TP PATH > 48568 0x800c00000 0x820c00000 rw- 131072 0 51712 2 = 0 --S df=20 >=20 > it tells me that for the region 0x800c00000-0x820c00000 (512Mb) we = have 131072 > * 4k =3D 512Mb resident and 51712 * 4k =3D 202Mb (a litle less than a = half of the > region) promoted (mapped) to superpages. >=20 > If I had number of superpages here I would need additional knowledge = (a > superpage size) to calculate how effectively superpages are used. >=20 > But actually, no much difference for me. To get a number of superpages = is it > enough just to divide the result obtained counting normal-sized pages = by > (2M/4k) factor? Remember also that superpage sizes are not necessarily 2M on all = architectures, and in principle, many different page sizes might be = simultaneously supported (e.g., on MIPS). I wonder if there's some way = to capture that notion in the output somewhere so that, if we start = supporting more granular page size control (something Alan might comment = on), tool output doesn't need to be changed. Robert From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 10:06:05 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 031CD106566B; Sat, 9 Jun 2012 10:06:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 913C28FC12; Sat, 9 Jun 2012 10:06:04 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q59A5wET067219; Sat, 9 Jun 2012 13:05:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q59A5w2A055621; Sat, 9 Jun 2012 13:05:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q59A5wB8055620; Sat, 9 Jun 2012 13:05:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 9 Jun 2012 13:05:58 +0300 From: Konstantin Belousov To: Mikolaj Golub Message-ID: <20120609100558.GM85127@deviant.kiev.zoral.com.ua> References: <86sje5kkl6.fsf@kopusha.home.net> <20120609083822.GJ85127@deviant.kiev.zoral.com.ua> <86obosluvk.fsf@kopusha.home.net> <20120609090740.GL85127@deviant.kiev.zoral.com.ua> <86k3zglsvm.fsf@kopusha.home.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QV9egoCq9O4JbpTr" Content-Disposition: inline In-Reply-To: <86k3zglsvm.fsf@kopusha.home.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Alan Cox , Wojciech Puchar , Robert Watson , Ivan Voras , freebsd-hackers@freebsd.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 10:06:05 -0000 --QV9egoCq9O4JbpTr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 09, 2012 at 12:46:53PM +0300, Mikolaj Golub wrote: >=20 > On Sat, 9 Jun 2012 12:07:40 +0300 Konstantin Belousov wrote: >=20 > KB> Well, if I see a report informing me that some 2M region contains 51= 2 super > KB> pages, how should I interpret it ? For me, it is only one superpage = (mapping) > KB> that can be created in one 2M region. >=20 > Well, if I see a report like below: >=20 > PID START END PRT RES PRES SUP REF SHD= FL TP PATH > 48568 0x800c00000 0x820c00000 rw- 131072 0 51712 2 0= --S df=20 >=20 > it tells me that for the region 0x800c00000-0x820c00000 (512Mb) we have 1= 31072 > * 4k =3D 512Mb resident and 51712 * 4k =3D 202Mb (a litle less than a hal= f of the > region) promoted (mapped) to superpages. >=20 > If I had number of superpages here I would need additional knowledge (a > superpage size) to calculate how effectively superpages are used. >=20 > But actually, no much difference for me. To get a number of superpages is= it > enough just to divide the result obtained counting normal-sized pages by > (2M/4k) factor? First, there is nothing which would prevent demotion from happens while you iterate over the map, so you could get funyy numbers, like 42 superpages for 2M region with your method. Second, the superpage size if machine-depended, and even single machine could support differently sized superpage. For amd64, hardware can support 2M and 1G pages, and for i386 you can get 4M or 2M depending on PAE config. And last, I in fact do not see much use for any 'superpage count'. Would I would like to see is the TLB miss count for a region. Then I could estimate whether superpage enabling provided some advantage. Just as a note, if there were no accesses to a region after promotion, then promotion is the waste. Anyway, please do not consider this as discouraging you from doing a useful work. --QV9egoCq9O4JbpTr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/TIAYACgkQC3+MBN1Mb4hBTQCeOYZPmAX1mDYqbJM7YRQ3GAMF oRYAoLkfSMEpFHA7Y0DlRVGo182cXee9 =Dh4E -----END PGP SIGNATURE----- --QV9egoCq9O4JbpTr-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 12:36:32 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79D4F1065673; Sat, 9 Jun 2012 12:36:32 +0000 (UTC) (envelope-from rwatson@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 45FF58FC12; Sat, 9 Jun 2012 12:36:32 +0000 (UTC) Received: from [192.168.2.102] (host109-153-160-182.range109-153.btcentralplus.com [109.153.160.182]) by cyrus.watson.org (Postfix) with ESMTPSA id B025146B0C; Sat, 9 Jun 2012 08:36:30 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: <20120609100558.GM85127@deviant.kiev.zoral.com.ua> Date: Sat, 9 Jun 2012 13:36:28 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <32F2E0AA-B490-4ED3-988F-09226230652A@freebsd.org> References: <86sje5kkl6.fsf@kopusha.home.net> <20120609083822.GJ85127@deviant.kiev.zoral.com.ua> <86obosluvk.fsf@kopusha.home.net> <20120609090740.GL85127@deviant.kiev.zoral.com.ua> <86k3zglsvm.fsf@kopusha.home.net> <20120609100558.GM85127@deviant.kiev.zoral.com.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1257) Cc: Mikolaj Golub , Wojciech Puchar , Alan Cox , Ivan Voras , freebsd-hackers@freebsd.org Subject: Re: SuperPages utilization survey X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 12:36:32 -0000 On 9 Jun 2012, at 11:05, Konstantin Belousov wrote: > First, there is nothing which would prevent demotion from happens = while > you iterate over the map, so you could get funyy numbers, like 42 = superpages > for 2M region with your method. >=20 > Second, the superpage size if machine-depended, and even single = machine > could support differently sized superpage. For amd64, hardware can = support > 2M and 1G pages, and for i386 you can get 4M or 2M depending on PAE = config. >=20 > And last, I in fact do not see much use for any 'superpage count'. = Would I > would like to see is the TLB miss count for a region. Then I could = estimate > whether superpage enabling provided some advantage. Just as a note, if > there were no accesses to a region after promotion, then promotion is > the waste. >=20 > Anyway, please do not consider this as discouraging you from doing a > useful work. Despite the rendering and underlying semantic issues, I admit that I = would like to know when superpages are being used by processes -- = perhaps enough information to construct a histogram of page sizes for = each mapping. Robert= From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 14:35:31 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 348DF1065676 for ; Sat, 9 Jun 2012 14:35:31 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id E346D8FC1C for ; Sat, 9 Jun 2012 14:35:30 +0000 (UTC) Received: from [188.174.62.150] (helo=localhost.my.domain) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1SdMlF-0006Wq-Gy for freebsd-hackers@freebsd.org; Sat, 09 Jun 2012 16:35:29 +0200 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.my.domain (8.14.4/8.14.3) with ESMTP id q59EZR8S003971 for ; Sat, 9 Jun 2012 16:35:28 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.14.4/8.14.3/Submit) id q59EZRgM003970 for freebsd-hackers@freebsd.org; Sat, 9 Jun 2012 16:35:27 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Sat, 9 Jun 2012 16:35:21 +0200 From: Matthias Apitz To: freebsd-hackers@freebsd.org Message-ID: <20120609143521.GA3940@tinyCurrent> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 9.0-CURRENT r214444 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 188.174.62.150 Subject: cleaning /usr/obj before copying it to USB key X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 14:35:31 -0000 Hi, I build kernel and userland (out of SVN) and install in on an USB key mounted as /mnt this way: # cd /usr/src ... # make installworld DESTDIR=/mnt # make installkernel DESTDIR=/mnt KERNCONF=GENERIC INSTALL_NODEBUG=t # make distrib-dirs DESTDIR=/mnt # make distribution DESTDIR=/mnt To use the (booted) USB key later to install other laptops or netbooks I enrich the key with /usr/src and /usr/obj as: # cd /usr # cp -Rp src /mnt/usr # cp -Rp obj /mnt/usr Having done this I can use the key just to install the system on the laptop with the above DESTDIR=/mnt wherein /mnt is now the target root of the laptop; all this works just fine; my problem is that the both 'cp -Rp ...' commands takes many hours (12 and six hours) because they are transferring a lot(!!!) of small files; I have had a look into /usr/obj and it seems that after 'makeworld' and 'makekernel' there are left over a lot of temporary files from the build processes... is there a clean way to remove those files before 'cp -Rp obj /mnt/usr' while the result is still useful for another make install with DESTDIR=/mnt ? Thanks matthias -- Matthias Apitz t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.unixarea.de/ UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5 From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 14:37:49 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB06D106566C for ; Sat, 9 Jun 2012 14:37:49 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: from mail-gh0-f182.google.com (mail-gh0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5EB218FC1D for ; Sat, 9 Jun 2012 14:37:49 +0000 (UTC) Received: by ghbz22 with SMTP id z22so2079174ghb.13 for ; Sat, 09 Jun 2012 07:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; bh=Rd3q/bLDeb6bbNE+zVPimKvJ8UbWE4ehciif4+mPNhQ=; b=dN0Ee/kq0jMBku9qpqsEWvQkgvL9osnNc7EjMn63hzPY1biXnhSp6kGWXv1BzMY5H4 MUAZLeRvzk1E5N2GF5oWZh/GKLpIweci9n1c/vLmjeB9r8tyzAADpasqqq2HelNs5sG7 ksey2ZDsEUH8S4s61TvyagGnGMh91rh6CqkKg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:x-gm-message-state; bh=Rd3q/bLDeb6bbNE+zVPimKvJ8UbWE4ehciif4+mPNhQ=; b=QR8kK+tnxvHnimZbx7TnUF1p9jgqHEhpoYuDOvrLStqGFJqRIbjF1nbL4RFDdGrctY YnwW/FLb8EaTNnKepzdoR3yUptlJi4NOJM1hMSu8gzMGvCM/PyaqGHNWE8iI7udqOrFF tFvsnrbTsLJSCcCWOionUSgCWtEbFMEarQVaXgp6+XwHXPxYbnwXn3WIBxPqYh4viVw1 zDyR78QOVhqF+HfVrcMQuISuPIj7cIl5mDOGWAfycPhv/vtoLv8NpXCMAdVcBafi/f5U KQHFN1mSO61DJBszw7dg0Knmd1il3pOvNBS8X6p4rWAc24bb++yROsWgXajA04wbzczU kNsQ== Received: by 10.236.182.161 with SMTP id o21mr12577277yhm.43.1339252662734; Sat, 09 Jun 2012 07:37:42 -0700 (PDT) Received: from DataIX.net (75-128-120-86.dhcp.aldl.mi.charter.com. [75.128.120.86]) by mx.google.com with ESMTPS id p16sm15123430ano.19.2012.06.09.07.37.41 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 09 Jun 2012 07:37:42 -0700 (PDT) Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id q59EbeaJ068451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 9 Jun 2012 10:37:40 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Received: (from jh@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id q59Ebe5U068450; Sat, 9 Jun 2012 10:37:40 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Date: Sat, 9 Jun 2012 10:37:40 -0400 From: Jason Hellenthal To: Andriy Gapon Message-ID: <20120609143739.GB67878@DataIX.net> References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> <20120607095741.GA1361@reks> <4FD07D11.9030002@FreeBSD.org> <20120609011630.GA48866@DataIX.net> <4FD2D102.4070103@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FD2D102.4070103@FreeBSD.org> X-Gm-Message-State: ALoCoQnT+YYAWyEhU4RgZ3HsOtJYutaC8uWHwsf4DJsCaWPEyOLKTLUmAOUvQiPUw13nzBjBcbAp Cc: freebsd-hackers@freebsd.org Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 14:37:49 -0000 On Sat, Jun 09, 2012 at 07:28:50AM +0300, Andriy Gapon wrote: > on 09/06/2012 04:16 Jason Hellenthal said the following: > > runlevel support might be a better solution so it does not differ that > > much from what other systems do and would be easy for people to grasp. > > Patches are welcome, as always. > I agree... ;) How about generic runlevel support through kenv instead ? Set runlevel by default to 3 , where just like any other system is multiuser, and provide support in the rc scripts to look at kenv. While documenting "runlevel" in init(8)'s man page since that is where most people look for these things. This way a we could define a while bunch of things around generic runlevels and if perhaps runlevels ever make it into FreeBSD the support for them will already exist. -- - (2^(N-1)) From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 14:45:52 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E93A106567A for ; Sat, 9 Jun 2012 14:45:52 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id CB8CF8FC08 for ; Sat, 9 Jun 2012 14:45:51 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SdMv9-0006Kk-1t for freebsd-hackers@freebsd.org; Sat, 09 Jun 2012 16:45:43 +0200 Received: from static-78-8-147-77.ssp.dialog.net.pl ([78.8.147.77]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 09 Jun 2012 16:45:43 +0200 Received: from mwisnicki+freebsd by static-78-8-147-77.ssp.dialog.net.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 09 Jun 2012 16:45:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Marcin Wisnicki Date: Sat, 9 Jun 2012 14:45:30 +0000 (UTC) Lines: 29 Message-ID: References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> <20120607095741.GA1361@reks> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: static-78-8-147-77.ssp.dialog.net.pl User-Agent: Pan/0.134 (Wait for Me; Unknown) Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 14:45:52 -0000 On Thu, 07 Jun 2012 12:57:41 +0300, Gleb Kurtsou wrote: > On (07/06/2012 11:56), Andriy Gapon wrote: >> A user doesn't have to select the option unless he needs to. A "simple >> user" can just reboot without selecting the option to get back his X. A >> user doesn't have to learn anything about the code, just about kenv and >> "magic" inhibit_gui variable. > > What do you think about adding generic support for overriding *_enable > options in rc.conf? > > I'd like to be able to disable services at boot prompt, e.g. # set > rc.slim_enable="no" -- overrides slim_enable="yes" in rc.conf > > Similarly rc.pf_enable="no" > > Then introduce x_enable knob (=yes by default) to disable login > managers. User will be able to override this setting with # service xdm > forcestart > That's trivial to implement: http://lists.freebsd.org/pipermail/freebsd-current/2007-November/079241.html Still applies with minor reject that can be ignored or easily resolved. It also brings support for overriding path to rc.conf, allowing multiple boot configurations. From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 15:00:12 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 427AC1065673 for ; Sat, 9 Jun 2012 15:00:11 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id A4F278FC08 for ; Sat, 9 Jun 2012 15:00:05 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q59EximJ012411; Sat, 9 Jun 2012 16:59:48 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q59Exctg012342; Sat, 9 Jun 2012 16:59:42 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 9 Jun 2012 16:59:38 +0200 (CEST) From: Wojciech Puchar To: Matthias Apitz In-Reply-To: <20120609143521.GA3940@tinyCurrent> Message-ID: References: <20120609143521.GA3940@tinyCurrent> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sat, 09 Jun 2012 16:59:50 +0200 (CEST) Cc: freebsd-hackers@freebsd.org Subject: Re: cleaning /usr/obj before copying it to USB key X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 15:00:12 -0000 > my problem is that the both 'cp -Rp ...' commands takes many hours (12 > and six hours) because they are transferring a lot(!!!) of small files; I unless you want to kill you USB drive quickly (yes, it simulates disk THAT badly) then create image file on your hard disk exactly equal to your USB , use mdconfig, make all you need and then write with dd. From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 16:17:44 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 20D4E106564A; Sat, 9 Jun 2012 16:17:44 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 9122114EA79; Sat, 9 Jun 2012 16:17:43 +0000 (UTC) Message-ID: <4FD37727.60705@FreeBSD.org> Date: Sat, 09 Jun 2012 09:17:43 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120608 Thunderbird/12.0.1 MIME-Version: 1.0 To: Andriy Gapon References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> <20120607095741.GA1361@reks> <4FD0BAC6.6000304@FreeBSD.org> <4FD0EEB1.10103@FreeBSD.org> In-Reply-To: <4FD0EEB1.10103@FreeBSD.org> X-Enigmail-Version: 1.4.2 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 16:17:44 -0000 On 06/07/2012 11:10, Andriy Gapon wrote: > on 07/06/2012 17:29 Doug Barton said the following: >> On 06/07/2012 02:57 AM, Gleb Kurtsou wrote: >>> What do you think about adding generic support for overriding *_enable >>> options in rc.conf? >>> >>> I'd like to be able to disable services at boot prompt, e.g. >>> # set rc.slim_enable="no" -- overrides slim_enable="yes" in rc.conf >>> >>> Similarly rc.pf_enable="no" >>> >>> Then introduce x_enable knob (=yes by default) to disable login >>> managers. User will be able to override this setting with >>> # service xdm forcestart >> >> Why not just: >> >> boot single user >> fsck -p >> mount -a >> $EDITOR /etc/rc.conf[.local] >> > > Ah, right. Why provide a way to do something using one command at one prompt > (or even toggling a menu option using a single keystroke) when you can already > do the same using multiple commands at multiple places (and also trying to not > forget to undo your changes later)... I realize you were being sarcastic, but your question deserves an answer. If this were a problem we didn't already have a solution for, I'd be much more interested in what you're proposing. But in no particular order ... 1. This is not something most users would have to do very often, if at all. 2. We have a variety of different login managers, several of which do things subtly differently, all of which would need ongoing support. 3. While the changes you're proposing sound simple, the startup stuff has some subtle interactions that we don't like to disrupt without good reason. It's also worth pointing out that if all you need is a shell at boot time, you can still do Ctrl-Alt-F1 to get that, without having to change anything. And if you find yourself needing to prevent the login manager from starting more often than not, just disable it by default and start it with 'service onestart', or use startx. My point being that this doesn't come with zero costs, and has very little benefit. That usually spells "no" in my book. Doug -- This .signature sanitized for your protection From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 16:24:52 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88E44106566C for ; Sat, 9 Jun 2012 16:24:52 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 5A9728FC12 for ; Sat, 9 Jun 2012 16:24:52 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id q59FvYpc041748; Sat, 9 Jun 2012 15:57:34 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id 57k8rps854pk38vgqyuu6yks42; Sat, 09 Jun 2012 15:57:34 +0000 (UTC) (envelope-from tim@kientzle.com) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=windows-1252 From: Tim Kientzle In-Reply-To: <20120609143521.GA3940@tinyCurrent> Date: Sat, 9 Jun 2012 08:57:33 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <79C2B8B9-9A7E-4793-AE03-FE387BB1694B@kientzle.com> References: <20120609143521.GA3940@tinyCurrent> To: Matthias Apitz X-Mailer: Apple Mail (2.1278) Cc: freebsd-hackers@freebsd.org Subject: Re: cleaning /usr/obj before copying it to USB key X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 16:24:52 -0000 On Jun 9, 2012, at 7:35 AM, Matthias Apitz wrote: >=20 > To use the (booted) USB key later to install other laptops or netbooks = I > enrich the key with /usr/src and /usr/obj as: >=20 > # cd /usr > # cp -Rp src /mnt/usr > # cp -Rp obj /mnt/usr >=20 > my problem is that the both 'cp -Rp ...' commands takes many hours (12 > and six hours) because they are transferring a lot(!!!) of small = files; As someone else pointed out, flash drives are pretty slow when making a lot of small writes. You can speed things up a lot by creating the image locally then copying the image to USB. Here are parts of a shell script I've been using for something similar: # Create an empty file IMG_SIZE bytes dd if=3D/dev/zero of=3D${IMG} bs=3D1 seek=3D${IMG_SIZE} count=3D0 # Attach it as a virtual disk device MD=3D`mdconfig -a -t vnode -f ${IMG}` # Partition the virtual disk gpart create -s MBR ${MD} gpart add -t freebsd ${MD} gpart set -a active -i 1 ${MD} # Format and mount newfs ${MD}s1 >/dev/null mount /dev/${MD}s1 /mnt =85 copy stuff =85 # Unmount and detach the virtual disk umount /dev/${MD}s1 mdconfig -d -u ${MD} # Copy the disk image to your flash drive dd if=3D${IMG} of=3D${SDCARD} bs=3D8m > I have had a look into /usr/obj and it seems that after 'makeworld' = and > 'makekernel' there are left over a lot of temporary files from the = build > processes... >=20 > is there a clean way to remove those files before 'cp -Rp obj = /mnt/usr' > while the result is still useful for another make install with = DESTDIR=3D/mnt ? You can delete all of the '.o' files using a command like this: find /usr/obj -name '*.o' | xargs rm With a little experimenting, you should be able to extend this to remove most of the intermediate files. From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 16:27:13 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D79D1065678 for ; Sat, 9 Jun 2012 16:27:13 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta13.emeryville.ca.mail.comcast.net (qmta13.emeryville.ca.mail.comcast.net [76.96.27.243]) by mx1.freebsd.org (Postfix) with ESMTP id 1F74D8FC18 for ; Sat, 9 Jun 2012 16:27:13 +0000 (UTC) Received: from omta08.emeryville.ca.mail.comcast.net ([76.96.30.12]) by qmta13.emeryville.ca.mail.comcast.net with comcast id LGQR1j0040FhH24ADGT74K; Sat, 09 Jun 2012 16:27:07 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta08.emeryville.ca.mail.comcast.net with comcast id LGT51j00d4NgCEG8UGT6xF; Sat, 09 Jun 2012 16:27:06 +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 q59GR3e0028836; Sat, 9 Jun 2012 10:27:04 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Wojciech Puchar In-Reply-To: References: Content-Type: text/plain; charset="us-ascii" Date: Sat, 09 Jun 2012 10:27:03 -0600 Message-ID: <1339259223.36051.328.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: wired memory - again! X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 16:27:13 -0000 On Sat, 2012-06-09 at 09:21 +0200, Wojciech Puchar wrote: > top reports wired memory 128MB > > > WHERE it is used? below results of vmstat -m and vmstat -z > values does not sum up even to half of it > FreeBSD 9 - few days old. > > What i am missing and why there are SO MUCH wired memory on 1GB machine > without X11 or virtualbox > > [vmstat output snipped] > I have been struggling to answer the same question for about a week on our embedded systems (running 8.2). We have systems with 64MB ram which have 20MB wired, and I couldn't find any way to directly view what that wired memory is being used for. I also discovered that the vmstat output accounted for only a tiny fraction of the 20MB. What I eventually determined is that there is some sort of correlation between vfs buffer space and wired memory. Our embedded systems typically do very little disk IO, but during some testing we were spewing debug output to /var/log/messages at the rate of several lines per second for hours. Under these conditions the amount of wired memory would climb from its usual of about 8MB to around 20MB, and once it climbed that high it pretty much never went down, or only went down a couple MB. The resulting memory pressure caused our apps to get killed over and over again with "out of swap space" (we have no swap on these systems). The kernel auto-tunes the vfs buffer space using the formula "for the first 64 MB of ram use 1/4 for buffers, plus 1/10 of the ram over 64 MB." Using 16 of 64 MB of ram for buffer space seems insane to me, but maybe it makes sense on certain types of servers or something. I added "option NBUF=128" to our kernel config and that dropped the buffer space to under 2 MB and since doing that I haven't seen the amount of wired memory ever go above 8 MB. I wonder whether my tuning of NBUF is affecting wired memory usage by indirectly tuning the 'nswbuf' value; I can't tune nswbuf directly because the embedded system is ARM-based and we have no loader(8) for setting tunablables. I'm not sure NBUF=128 is a good setting even for a system that doesn't do much IO, so I consider it experimental and we're testing under a variety of conditions to see if it leads to any unexpected behaviors. I'm certainly not suggesting anyone else rush to add this option to their kernel config. I am VERY curious about the nature of this correlation between vfs buffer space and wired memory. For the VM gurus: Is the behavior I'm seeing expected? Why would memory become wired and seemingly never get released back to one of the page queues after the IO is done? -- Ian From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 16:52:27 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E54EA106566C for ; Sat, 9 Jun 2012 16:52:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 65CE08FC1C for ; Sat, 9 Jun 2012 16:52:26 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q59GqI5p072661; Sat, 9 Jun 2012 19:52:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q59GqIbq057230; Sat, 9 Jun 2012 19:52:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q59GqHTa057229; Sat, 9 Jun 2012 19:52:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 9 Jun 2012 19:52:17 +0300 From: Konstantin Belousov To: Ian Lepore Message-ID: <20120609165217.GO85127@deviant.kiev.zoral.com.ua> References: <1339259223.36051.328.camel@revolution.hippie.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vrIGRKnBmQs2THAk" Content-Disposition: inline In-Reply-To: <1339259223.36051.328.camel@revolution.hippie.lan> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Wojciech Puchar , freebsd-hackers@freebsd.org Subject: Re: wired memory - again! X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 16:52:28 -0000 --vrIGRKnBmQs2THAk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 09, 2012 at 10:27:03AM -0600, Ian Lepore wrote: > On Sat, 2012-06-09 at 09:21 +0200, Wojciech Puchar wrote: > > top reports wired memory 128MB > >=20 > >=20 > > WHERE it is used? below results of vmstat -m and vmstat -z > > values does not sum up even to half of it > > FreeBSD 9 - few days old. > >=20 > > What i am missing and why there are SO MUCH wired memory on 1GB machine= =20 > > without X11 or virtualbox > >=20 > > [vmstat output snipped] > >=20 >=20 >=20 > I have been struggling to answer the same question for about a week on > our embedded systems (running 8.2). We have systems with 64MB ram which > have 20MB wired, and I couldn't find any way to directly view what that > wired memory is being used for. I also discovered that the vmstat > output accounted for only a tiny fraction of the 20MB. >=20 > What I eventually determined is that there is some sort of correlation > between vfs buffer space and wired memory. Our embedded systems > typically do very little disk IO, but during some testing we were > spewing debug output to /var/log/messages at the rate of several lines > per second for hours. Under these conditions the amount of wired memory > would climb from its usual of about 8MB to around 20MB, and once it > climbed that high it pretty much never went down, or only went down a > couple MB. The resulting memory pressure caused our apps to get killed > over and over again with "out of swap space" (we have no swap on these > systems). >=20 > The kernel auto-tunes the vfs buffer space using the formula "for the > first 64 MB of ram use 1/4 for buffers, plus 1/10 of the ram over 64 > MB." Using 16 of 64 MB of ram for buffer space seems insane to me, but > maybe it makes sense on certain types of servers or something. I added > "option NBUF=3D128" to our kernel config and that dropped the buffer space > to under 2 MB and since doing that I haven't seen the amount of wired > memory ever go above 8 MB. I wonder whether my tuning of NBUF is > affecting wired memory usage by indirectly tuning the 'nswbuf' value; I > can't tune nswbuf directly because the embedded system is ARM-based and > we have no loader(8) for setting tunablables. >=20 > I'm not sure NBUF=3D128 is a good setting even for a system that doesn't > do much IO, so I consider it experimental and we're testing under a > variety of conditions to see if it leads to any unexpected behaviors. > I'm certainly not suggesting anyone else rush to add this option to > their kernel config. >=20 > I am VERY curious about the nature of this correlation between vfs > buffer space and wired memory. For the VM gurus: Is the behavior I'm > seeing expected? Why would memory become wired and seemingly never get > released back to one of the page queues after the IO is done? Hopefully, I can give you some information while you are waiting for answer from gurus. First, all memory allocated by UMA and consequently malloc(9) is wired. In other words, almost all memory used by kernel is accounted as wired. Second, the buffer cache wires the pages which are inserted into VMIO buffers. So your observation is basically right, cached buffers means that corresponding memory is removed from queues and put into wired state. When buffers are dissolved, pages are unwired and deactivated. This behaviour is in fact required by VFS, since you do expect to access buffer data when you get the buffer. --vrIGRKnBmQs2THAk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/Tf0EACgkQC3+MBN1Mb4h4pgCeI4rR+N1+QGG3sqtpYWVhIk9T SVMAoKhwxfkZkeNAcXbgg2XuyltA+dvf =oxCQ -----END PGP SIGNATURE----- --vrIGRKnBmQs2THAk-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 17:46:18 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7BE33106564A; Sat, 9 Jun 2012 17:46:18 +0000 (UTC) (envelope-from rflynn@acsalaska.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 478268FC1A; Sat, 9 Jun 2012 17:46:18 +0000 (UTC) Received: from [127.0.0.1] (squeeze.lan.rachie.is-a-geek.net [192.168.2.30]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id B04FC7E884; Sat, 9 Jun 2012 09:46:16 -0800 (AKDT) Message-ID: <4FD38BE2.70703@acsalaska.net> Date: Sat, 09 Jun 2012 19:46:10 +0200 From: Mel Flynn User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Michael Bushkov References: <4FD1207C.8020907@acsalaska.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers Subject: Re: nss compat shims X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 17:46:18 -0000 On 8-6-2012 22:06, Michael Bushkov wrote: > I don't know for sure, but it seems that there was no need to support > anything besides groups and password when nss_compat.c was committed. > At that time, IIRC, the modules that we had in ports supported only > these databases. Right. In the meantime hosts has been implemented in nss-pam-ldapd but currently does not work (at least on 9). It's been the author's concern too whether services/protocols etc is a needed feature, but I guess you won't find that out until you provide the feature. At least it seems logical to me to keep the nss_compat interface synchronized with the APIs that call nsdispatch. I guess I'll make patches for both. -- Mel From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 17:55:44 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0C5C1065673 for ; Sat, 9 Jun 2012 17:55:44 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id 68F2E8FC16 for ; Sat, 9 Jun 2012 17:55:44 +0000 (UTC) Received: from [82.113.121.214] (helo=tiny.Sisis.de) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1SdPt0-0006O7-ER for freebsd-hackers@freebsd.org; Sat, 09 Jun 2012 19:55:43 +0200 Received: from tiny.Sisis.de (localhost [127.0.0.1]) by tiny.Sisis.de (8.14.5/8.14.3) with ESMTP id q59HthW9001151 for ; Sat, 9 Jun 2012 19:55:43 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by tiny.Sisis.de (8.14.5/8.14.3/Submit) id q59Htg3k001150 for freebsd-hackers@freebsd.org; Sat, 9 Jun 2012 19:55:43 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: tiny.Sisis.de: guru set sender to guru@unixarea.de using -f Date: Sat, 9 Jun 2012 19:55:42 +0200 From: Matthias Apitz To: freebsd-hackers@freebsd.org Message-ID: <20120609175542.GA1108@tiny> References: <20120609143521.GA3940@tinyCurrent> <79C2B8B9-9A7E-4793-AE03-FE387BB1694B@kientzle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <79C2B8B9-9A7E-4793-AE03-FE387BB1694B@kientzle.com> X-Operating-System: FreeBSD 10.0-CURRENT r226986 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 82.113.121.214 Subject: Re: cleaning /usr/obj before copying it to USB key X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 17:55:44 -0000 El día Saturday, June 09, 2012 a las 08:57:33AM -0700, Tim Kientzle escribió: > On Jun 9, 2012, at 7:35 AM, Matthias Apitz wrote: > > > > To use the (booted) USB key later to install other laptops or netbooks I > > enrich the key with /usr/src and /usr/obj as: > > > > # cd /usr > > # cp -Rp src /mnt/usr > > # cp -Rp obj /mnt/usr > > > > my problem is that the both 'cp -Rp ...' commands takes many hours (12 > > and six hours) because they are transferring a lot(!!!) of small files; > > As someone else pointed out, flash drives are pretty slow > when making a lot of small writes. > > You can speed things up a lot by creating the image locally > then copying the image to USB. Here are parts of a shell > script I've been using for something similar: > ... Thanks for your hints, Wojciech and Tim; the USB key in question is of 16 marketing GByte; will this work as well with mdconfig or is there some limit? Thanks again matthias -- Matthias Apitz e - w http://www.unixarea.de/ UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5 From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 18:08:58 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC094106564A for ; Sat, 9 Jun 2012 18:08:58 +0000 (UTC) (envelope-from george+freebsd@m5p.com) Received: from mailhost.m5p.com (ip-2-2-0-2.r20.asbnva02.us.ce.gin.ntt.net [IPv6:2001:418:0:5000::16]) by mx1.freebsd.org (Postfix) with ESMTP id 5F7EA8FC1A for ; Sat, 9 Jun 2012 18:08:58 +0000 (UTC) Received: from wonderland.m5p.com (localhost [IPv6:::1]) by mailhost.m5p.com (8.14.4/8.14.4) with ESMTP id q59I8qR2054086 for ; Sat, 9 Jun 2012 14:08:57 -0400 (EDT) (envelope-from george+freebsd@m5p.com) Message-ID: <4FD39134.7040108@m5p.com> Date: Sat, 09 Jun 2012 14:08:52 -0400 From: George Mitchell User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120604 Thunderbird/10.0.3 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4FD05C16.9040905@FreeBSD.org> <20120607084738.GT85127@deviant.kiev.zoral.com.ua> <4FD06CD3.3080602@FreeBSD.org> <20120607095741.GA1361@reks> <4FD07D11.9030002@FreeBSD.org> <20120609011630.GA48866@DataIX.net> <4FD2D102.4070103@FreeBSD.org> <20120609143739.GB67878@DataIX.net> In-Reply-To: <20120609143739.GB67878@DataIX.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (mailhost.m5p.com [IPv6:::1]); Sat, 09 Jun 2012 14:08:57 -0400 (EDT) X-Scanned-By: MIMEDefang 2.72 on 10.100.0.3 Subject: Re: boot menu option to disable graphics mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 18:08:58 -0000 On 06/09/12 10:37, Jason Hellenthal wrote: > > On Sat, Jun 09, 2012 at 07:28:50AM +0300, Andriy Gapon wrote: >> on 09/06/2012 04:16 Jason Hellenthal said the following: >>> runlevel support might be a better solution so it does not differ that >>> much from what other systems do and would be easy for people to grasp. >> Patches are welcome, as always. >> > I agree... ;) > > How about generic runlevel support through kenv instead ? I've wondered whether it would be more "BSD-sh" to specify a way to tell init, "Tell /etc/rc to run the scripts listed by rcorder up until we get NETWORKING." (Or SERVERS or whatever dependency you need, or "Stop just before LOGIN".) -- George Mitchell > > > Set runlevel by default to 3 , where just like any other system is > multiuser, and provide support in the rc scripts to look at kenv. While > documenting "runlevel" in init(8)'s man page since that is where most > people look for these things. > > > This way a we could define a while bunch of things around generic > runlevels and if perhaps runlevels ever make it into FreeBSD the support > for them will already exist. > > From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 20:47:38 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5BBC2106564A for ; Sat, 9 Jun 2012 20:47:38 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 1A32C8FC1D for ; Sat, 9 Jun 2012 20:47:31 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q59Kkjtc016535; Sat, 9 Jun 2012 22:46:50 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q59KiCV6015317; Sat, 9 Jun 2012 22:44:14 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 9 Jun 2012 22:44:12 +0200 (CEST) From: Wojciech Puchar To: Ian Lepore In-Reply-To: <1339259223.36051.328.camel@revolution.hippie.lan> Message-ID: References: <1339259223.36051.328.camel@revolution.hippie.lan> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sat, 09 Jun 2012 22:46:52 +0200 (CEST) Cc: freebsd-hackers@freebsd.org Subject: Re: wired memory - again! X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 20:47:38 -0000 > The kernel auto-tunes the vfs buffer space using the formula "for the > first 64 MB of ram use 1/4 for buffers, plus 1/10 of the ram over 64 i always limit it by kern.maxbcache=20000000 on 1GB RAM machine with lots of I/O but actually with default MAXBSIZE and little I/O you can use safely 1MB It DOES NOT limit how much files are cached. But still - in spite of that i have a lot of wired memory. still it is bad nobody answered how to pin down "wired" memory use. instead of experimenting i would like rather to understand what is what. From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 20:47:44 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEAB61065673 for ; Sat, 9 Jun 2012 20:47:44 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 734528FC24 for ; Sat, 9 Jun 2012 20:47:38 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q59KktDF016569; Sat, 9 Jun 2012 22:46:59 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q59KjuhC016330; Sat, 9 Jun 2012 22:46:00 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 9 Jun 2012 22:45:56 +0200 (CEST) From: Wojciech Puchar To: Konstantin Belousov In-Reply-To: <20120609165217.GO85127@deviant.kiev.zoral.com.ua> Message-ID: References: <1339259223.36051.328.camel@revolution.hippie.lan> <20120609165217.GO85127@deviant.kiev.zoral.com.ua> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Sat, 09 Jun 2012 22:47:02 +0200 (CEST) Cc: Ian Lepore , freebsd-hackers@freebsd.org Subject: Re: wired memory - again! X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 20:47:45 -0000 > > First, all memory allocated by UMA and consequently malloc(9) is > wired. In other words, almost all memory used by kernel is accounted > as wired. > yes i understand this. still i found no way how to find out what allocated that much. > Second, the buffer cache wires the pages which are inserted into VMIO > buffers. So your observation is basically right, cached buffers means what are exactly "VMIO" buffers. i understand that page must be wired WHEN doing I/O. But i have too much wired memory even when doing no I/O at all. > that corresponding memory is removed from queues and put into wired > state. When buffers are dissolved, pages are unwired and deactivated. > > This behaviour is in fact required by VFS, since you do expect to access > buffer data when you get the buffer. > From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 21:29:05 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEB3C106566B; Sat, 9 Jun 2012 21:29:05 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id ED8BA8FC08; Sat, 9 Jun 2012 21:29:04 +0000 (UTC) Received: by wibhn6 with SMTP id hn6so1363831wib.13 for ; Sat, 09 Jun 2012 14:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=dxGBpzWGUaTKy79D8V6ufq4W+au7G1hxdEGx1LBXn2g=; b=i5v9K3VVa7WvJ1Ld0aFXNONSWmaM6Z2du/8q21Wq+oMvtFhKE3rWh2m/vSL/uw7RC1 CDu2trdKaWKK/EToBh0qV7eUq7uN5EpAJsPpXO668FyIPFbLrq6NtKPTrTKkwNJtfGkn d8B6jgBO8ZaORhVZ84MiwngnawKV2MywF+MVhMC+4cecI97kSluYavxggaymfMJN6GhQ qqPjqLqXomb+tedFJkRn9AA3HRyE+VNjYdiYFuOSfCGAuyqmk4/lGUTVcn18tofjGNqz PkS/iuYqzn3EdUbECuO2cS3TNyoAWB1lSqnrM83D3kyZOfA8Xo9a+naLF9vHJjN/o9ck WI6g== MIME-Version: 1.0 Received: by 10.180.24.193 with SMTP id w1mr9823264wif.5.1339277342378; Sat, 09 Jun 2012 14:29:02 -0700 (PDT) Received: by 10.223.155.4 with HTTP; Sat, 9 Jun 2012 14:29:02 -0700 (PDT) In-Reply-To: References: <4FD0C1F4.2060108@FreeBSD.org> Date: Sat, 9 Jun 2012 14:29:02 -0700 Message-ID: From: Kevin Oberman To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Sat, 09 Jun 2012 21:29:23 +0000 Cc: Wojciech Puchar , hackers@freebsd.org, "Alexander V. Chernikov" , net@freebsd.org Subject: Re: ifconfig accepting hostname as ipv4 address X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 21:29:05 -0000 On Sat, Jun 9, 2012 at 12:37 AM, Garrett Cooper wrote: > On Sat, Jun 9, 2012 at 12:23 AM, Wojciech Puchar > wrote: >>> input. >>> Moreover, ifconfig em0 some_valid_fqdn/MASK silently ignores it, so you >>> can't set valid CIDR address using this notation. >>> >>> Classful era has ended more than 10 years ago, do we still want to keep >>> this behavior? >>> >> were not aware of that option, and it is rather stupid option - you shou= ld >> work on addresses not names when configuring network > > =A0 =A0I agree that it's not the best configuration in the world, as it > would only work 100% if a machine had proper DNS records or a > definitive hosts file. > =A0 =A0There are already enough bugs with static IP configurations and > hostnames as-is *I'm looking at you mountlate* -- no sense to > introduce more potentially buggy interoperability that only works in a > handful of niche cases. The idea was that you could enter all of the local interface names in /etc/hosts and than just put the names into the ifconfig commands. It was handy for keeping track of what port connected where on systems that had numerous interfaces, though this was more common in the day of async serial lines and modems. I'll admit that I have mixed feelings about its practicality today, though it does not hurt anything, as far as I can tell. --=20 R. Kevin Oberman, Network Engineer E-mail: kob6558@gmail.com