From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 19 00:16:39 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org 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 A703916A40F; Sun, 19 Nov 2006 00:16:39 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp1-g19.free.fr (smtp1-g19.free.fr [212.27.42.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F93743D67; Sun, 19 Nov 2006 00:16:32 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp1-g19.free.fr (Postfix) with ESMTP id 0863E3455; Sun, 19 Nov 2006 01:16:37 +0100 (CET) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 4A9E19B46E; Sun, 19 Nov 2006 00:17:06 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 316C7405B; Sun, 19 Nov 2006 01:17:06 +0100 (CET) Date: Sun, 19 Nov 2006 01:17:06 +0100 From: Jeremie Le Hen To: Ruslan Ermilov Message-ID: <20061119001706.GY20405@obiwan.tataz.chchile.org> References: <20061020150848.GQ53114@obiwan.tataz.chchile.org> <20061020191332.GC59856@rambler-co.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061020191332.GC59856@rambler-co.ru> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@FreeBSD.org, Jeremie Le Hen Subject: Re: [fbsd] Re: src.conf(5) seems to affect ports build 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, 19 Nov 2006 00:16:39 -0000 Ruslan, could you commit this patch, please ? Thank you. Regards, On Fri, Oct 20, 2006 at 11:13:32PM +0400, Ruslan Ermilov wrote: > On Fri, Oct 20, 2006 at 05:08:48PM +0200, Jeremie Le Hen wrote: > > Hi, > > > > src.conf(5) manual page states: > > > > % The src.conf file contains settings that will apply to every build > > % involving the FreeBSD source tree; see build(7). > > % ... > > % The only purpose of src.conf is to control the compilation of the FreeBSD > > % sources, which are usually found in /usr/src. > > > > However, share/mk/bsd.port.mk includes which in turn includes > > /etc/src.conf. Therefore if I have some WITH_/WITHOUT_ knob in it > > which affects CFLAGS, they will be taken into account even for port builds. > > > > Is it the expected behaviour ? Maybe WITH(OUT)_ should simply avoid > > modifying CFLAGS (though I think this might become useful in the near > > future). > > > See if the attached patch helps. If it does, I'll commit. I've > never heard back on this patch after I sent it to obrien@. > > > Cheers, > -- > Ruslan Ermilov > ru@FreeBSD.org > FreeBSD committer > Index: bsd.own.mk > =================================================================== > RCS file: /home/ncvs/src/share/mk/bsd.own.mk,v > retrieving revision 1.57 > diff -u -p -r1.57 bsd.own.mk > --- bsd.own.mk 30 Sep 2006 11:32:46 -0000 1.57 > +++ bsd.own.mk 30 Sep 2006 20:31:16 -0000 > @@ -104,10 +104,12 @@ > .if !target(____) > ____: > > +.if !defined(_WITHOUT_SRCCONF) > SRCCONF?= /etc/src.conf > .if exists(${SRCCONF}) > .include "${SRCCONF}" > .endif > +.endif > > # Binaries > BINOWN?= root > @@ -170,6 +172,7 @@ STRIP?= -s > COMPRESS_CMD?= gzip -cn > COMPRESS_EXT?= .gz > > +.if !defined(_WITHOUT_SRCCONF) > # > # Define MK_* variables (which are either "yes" or "no") for users > # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the > @@ -447,5 +450,6 @@ MK_${var}_SUPPORT:= no > MK_${var}_SUPPORT:= yes > .endif > .endfor > +.endif # !_WITHOUT_SRCCONF > > .endif # !target(____) > Index: bsd.port.mk > =================================================================== > RCS file: /home/ncvs/src/share/mk/bsd.port.mk,v > retrieving revision 1.308 > diff -u -p -r1.308 bsd.port.mk > --- bsd.port.mk 24 Aug 2006 18:04:49 -0000 1.308 > +++ bsd.port.mk 26 Aug 2006 13:55:59 -0000 > @@ -3,8 +3,9 @@ > PORTSDIR?= /usr/ports > BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk > > -# Needed to keep bsd.own.mk from reading in /etc/src.conf when building ports. > -SRCCONF= /dev/null > +# Needed to keep bsd.own.mk from reading in /etc/src.conf > +# and setting MK_* variables when building ports. > +_WITHOUT_SRCCONF= > > .include > .include "${BSDPORTMK}" -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 19 18:38:24 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 6926216A492 for ; Sun, 19 Nov 2006 18:38:24 +0000 (UTC) (envelope-from rob_belics@charter.net) Received: from mtai04.charter.net (mtai04.charter.net [209.225.8.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D7CA43DA0 for ; Sun, 19 Nov 2006 18:37:48 +0000 (GMT) (envelope-from rob_belics@charter.net) Received: from aa07.charter.net ([10.20.200.159]) by mtai04.charter.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with ESMTP id <20061119183751.NGC1477.mtai04.charter.net@aa07.charter.net> for ; Sun, 19 Nov 2006 13:37:51 -0500 Received: from [127.0.0.1] (really [71.85.241.27]) by aa07.charter.net with ESMTP id <20061119183751.UDRM10732.aa07.charter.net@[127.0.0.1]> for ; Sun, 19 Nov 2006 13:37:51 -0500 Message-ID: <4560A481.9040703@charter.net> Date: Sun, 19 Nov 2006 12:37:53 -0600 From: Rob Belics User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Chzlrs: 0 X-Mailman-Approved-At: Sun, 19 Nov 2006 21:03:11 +0000 Subject: The nature of kernel of the FreeBSD 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, 19 Nov 2006 18:38:24 -0000 Let's hear from Apple themselves at http://developer.apple.com/documentation/Darwin/Conceptual/KernelProgramming/BSD/chapter_11_section_3.html "the BSD portion of Mac OS X is primarily derived from FreeBSD" From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 20 10:01:50 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 AE28916A415 for ; Mon, 20 Nov 2006 10:01:50 +0000 (UTC) (envelope-from aag.lists@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2510C43D66 for ; Mon, 20 Nov 2006 10:01:34 +0000 (GMT) (envelope-from aag.lists@gmail.com) Received: by py-out-1112.google.com with SMTP id f31so960993pyh for ; Mon, 20 Nov 2006 02:01:49 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=R63quovg3v+kArVFz+lkKY+yT7Z9E94wSgqQ1+ZQKARfVaoquQfpAhLFUldmWaD5NOKSiVaGb+DTIkLsKtWgNfx1OFcgdTRTR2V6m5UTJrykinezGau4CHZR4209OXiFTt78brLVT2qYUCI+jLufdRS724LPyUu4LnuMsWT9r6Q= Received: by 10.35.98.6 with SMTP id a6mr314365pym.1164016909003; Mon, 20 Nov 2006 02:01:49 -0800 (PST) Received: by 10.35.58.4 with HTTP; Mon, 20 Nov 2006 02:01:48 -0800 (PST) Message-ID: <2f3a439f0611200201h4a96d43ave4e62ff2da8bdcb2@mail.gmail.com> Date: Mon, 20 Nov 2006 15:31:48 +0530 From: "Aditya Godbole" To: freebsd-hackers@freebsd.org In-Reply-To: <200611161805.kAGI5w9b013112@peedub.jennejohn.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2f3a439f0611160836r3c88c3f4ja9cc5a5f4b78a244@mail.gmail.com> <200611161805.kAGI5w9b013112@peedub.jennejohn.org> Subject: Re: Ramdisk 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, 20 Nov 2006 10:01:50 -0000 On 11/16/06, Gary Jennejohn wrote: > Unfortunately, u-boot makes heavy use of Linux' support for rootdev, etc., > which AFAIK is missing in FreeBSD. It heavily depends on passing lots of > necessary information in the Linux command line to influence the boot > process. > > BTW do you have any patches which you could contribute, or have you already > done that? > Right now, I'm taking the kernel command line from u-boot and performing appropriate actions in my bootstrap code. On the freebsd-ppc list we are talking about possible ways to remove dependencies on a particular bootloader. Cheers. -- aditya From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 20 08:44:39 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 E68FE16A416 for ; Mon, 20 Nov 2006 08:44:39 +0000 (UTC) (envelope-from Pradeep.Nallimelli@caviumnetworks.com) Received: from smtp2.caviumnetworks.com (smtp2.caviumnetworks.com [209.113.159.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A81543D5A for ; Mon, 20 Nov 2006 08:44:23 +0000 (GMT) (envelope-from Pradeep.Nallimelli@caviumnetworks.com) Received: from exch4.caveonetworks.com (Not Verified[192.168.16.23]) by smtp2.caviumnetworks.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Mon, 20 Nov 2006 03:44:15 -0500 Received: from [192.168.190.50] ([202.63.105.146]) by exch4.caveonetworks.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Mon, 20 Nov 2006 00:44:22 -0800 Message-ID: <45616BCF.5070606@caviumnetworks.com> Date: Mon, 20 Nov 2006 14:18:15 +0530 From: pnallimelli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.7.8-2 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Nov 2006 08:44:22.0686 (UTC) FILETIME=[138F63E0:01C70C80] X-Mailman-Approved-At: Mon, 20 Nov 2006 12:40:20 +0000 Subject: Freeing free mbuff panic 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, 20 Nov 2006 08:44:40 -0000 Hi, When i was doing ping flood , my system is crashing repeatedly with freeing free mbuff panic in FreeBSD 4.11. could anyone help in solving out the problem. boot poweroff_wait m_free m_freem ip_input ip_intr swi_net_next . . . . cpu_idle This is the backtrace of crashvump. Thankyou From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 20 13:17:53 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 0962B16A47B for ; Mon, 20 Nov 2006 13:17:53 +0000 (UTC) (envelope-from dunceor@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B9F343D79 for ; Mon, 20 Nov 2006 13:17:36 +0000 (GMT) (envelope-from dunceor@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so1552564wxc for ; Mon, 20 Nov 2006 05:17:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=ozlku2qT/wvsYduW6zen3tGoITGdmd7LNmrYseA3bD4hnCBG8MBYfrpX2C9yp+xFadMJsvhEun2J0zsKhn9IR4pEwFmjLGfbfhA1d9xANvBQ7c3JVdExJ/QUC526tAjpuVcHmlE3x34ZTfReT4ldq1j5vM73wiifbZqkctX/FrQ= Received: by 10.70.35.1 with SMTP id i1mr9693660wxi.1164028643044; Mon, 20 Nov 2006 05:17:23 -0800 (PST) Received: by 10.70.75.3 with HTTP; Mon, 20 Nov 2006 05:17:22 -0800 (PST) Message-ID: <5d84cb30611200517j3f8dd9d7wb949f2d09e1b1b03@mail.gmail.com> Date: Mon, 20 Nov 2006 14:17:22 +0100 From: Dunceor To: pnallimelli In-Reply-To: <45616BCF.5070606@caviumnetworks.com> MIME-Version: 1.0 References: <45616BCF.5070606@caviumnetworks.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Freeing free mbuff panic 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, 20 Nov 2006 13:17:53 -0000 You should submit a complete error report and an actual panic log and not just something you typed of the screen. It's very hard to find a bug with that little information. // Dunceor On 11/20/06, pnallimelli wrote: > > Hi, > > When i was doing ping flood , my system is crashing > repeatedly with freeing free mbuff panic in > FreeBSD 4.11. could anyone help in > solving out the problem. > > boot > poweroff_wait > m_free > m_freem > ip_input > ip_intr > swi_net_next > . > . > . > . > cpu_idle > > This is the backtrace of crashvump. > > Thankyou > _______________________________________________ > 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 Mon Nov 20 18:12:07 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 1DF8F16A52D for ; Mon, 20 Nov 2006 18:12:07 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6924743D5E for ; Mon, 20 Nov 2006 18:11:49 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 2F82446E68; Mon, 20 Nov 2006 13:12:06 -0500 (EST) Date: Mon, 20 Nov 2006 18:12:06 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Dirk Engling In-Reply-To: <455D2A7A.90109@erdgeist.org> Message-ID: <20061120180732.M86884@fledge.watson.org> References: <455D2A7A.90109@erdgeist.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Phantom Jails 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, 20 Nov 2006 18:12:07 -0000 On Fri, 17 Nov 2006, Dirk Engling wrote: > Rumors went around and tales were told about jails magically booing around > in prison list, even after they deceased. > > Most people consider this a rather aesthetical issue, however if you run > your jails from directories that need to be unmounted (e.g. from md-images, > on external drives, from gbde or geli images) those phantom jails become > rather annoying, since you cannot umount their roots. > > Investigations have shown, that > > 1) sockets hold a lock on (increase reference counter in) the ucred > structure of the calling process 2) This ucred structure in turn keeps a > lock on (increases reference counter in) the prison struct representing the > jail this process belongs to 3) The prison struct in turn keeps a handle to > jails root directory. > > If a process holding a tcp connection is killed, the connection is being > inherited by the kernel. It waits there for tcp tear down or tcp time out to > occur. Only then socket's lock on ucred is released, which releases ucreds > lock on prison struct (thus terminating phantom jails) which may, if it is > the last ucred referencing the prison, release the prison and its handle to > the root directory (solving my un-umount-able images). > > There were kinds of phantom jails being sighted, that did not vanish after > tcp timeout, that might be deadlocked by open files or mmaped regions. > However the above case happens regularly with my mail server jail that holds > hundreds of imap-connections, one disconnected dsl-user can prevent tcp tear > down to happen successfully thus forcing me to force umount the mail server. > > My suggestion would be (I will provide a patch, if discussion produces no > major disagreement) to release ucred structs held by sockets as soon as the > process dies. They are being used for accounting purposes only, anyway. The > same may apply to the other types of phantom jails, as well. I could not > create those deliberately and therefore can not exactly spot the proper > location to fix. The credentials on sockets (and PCBs) are used for a number of things, not least: - Visibility checks to determine which processes should be able to monitor them (netstat, sockstat, etc.) - For firewall uid/gid rule evaluation, such as with ipfw and pf. There may also be other cases that momentarily elude me. I think these mean we should not let the jail go away while the credential is in use as the jail information hung off the credential is required for access control purposes. However, we could think about discarding the vnode reference under some circumstances, leaving the jail without a vnode. This would mean that processes could no longer "join" the jail, but that it could still be used for process/socket/etc access control. Robert N M Watson Computer Laboratory University of Cambridge > > Comments? > > erdgeist > > P.S.: if you want to reproduce a phantom jail try the following: > 1) create and start a jail > 2) Start a ssh/web/whatever server within the jail > 3) Connect to that server from the host system. > 4) Keep this connection open while you kill the jail > 5) Do a 'jls' and compare its output to "ps axuu | grep J" > 6) Kill the process that connected to the service. > 7) Do a 'jls' again. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.3 (Darwin) > > iD8DBQFFXSp5ImmQdUyYEgkRAtOAAJ4iSzyu2LOf+RBNArvYAk1Tv8cssACfRxJa > 12OGEwWugcIDhlGGTHJrz0o= > =gXK8 > -----END PGP SIGNATURE----- > _______________________________________________ > 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 Mon Nov 20 19:20:09 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 4FA4A16A47C for ; Mon, 20 Nov 2006 19:20:09 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 239F943E58 for ; Mon, 20 Nov 2006 19:19:04 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 624BE1A4D88; Mon, 20 Nov 2006 11:19:21 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 9A41C51315; Mon, 20 Nov 2006 14:19:07 -0500 (EST) Date: Mon, 20 Nov 2006 14:19:07 -0500 From: Kris Kennaway To: Dunceor Message-ID: <20061120191907.GA46313@xor.obsecurity.org> References: <45616BCF.5070606@caviumnetworks.com> <5d84cb30611200517j3f8dd9d7wb949f2d09e1b1b03@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline In-Reply-To: <5d84cb30611200517j3f8dd9d7wb949f2d09e1b1b03@mail.gmail.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org, pnallimelli Subject: Re: Freeing free mbuff panic 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, 20 Nov 2006 19:20:09 -0000 --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Nov 20, 2006 at 02:17:22PM +0100, Dunceor wrote: > You should submit a complete error report and an actual panic log and not > just something you typed of the screen. It's very hard to find a bug with > that little information. True in general, but even if he does so it's unlikely he'll be able to find a developer who is still interested in tracking down bugs in 4.x. Kris --1yeeQ81UyVL57Vl7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFYf+rWry0BWjoQKURAhtgAJ9BmSN840PvkngMaaXli/kRZGisMwCgx0lG NbndrPpLSHkm2+NpXTsXurk= =1eU8 -----END PGP SIGNATURE----- --1yeeQ81UyVL57Vl7-- From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 20 22:10:02 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 1C3B016A407 for ; Mon, 20 Nov 2006 22:10:02 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp1-g19.free.fr (smtp1-g19.free.fr [212.27.42.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6738743D60 for ; Mon, 20 Nov 2006 22:09:43 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp1-g19.free.fr (Postfix) with ESMTP id 7160868BE6; Mon, 20 Nov 2006 23:10:00 +0100 (CET) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 310B09B46E; Mon, 20 Nov 2006 22:10:27 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 0E0E5405B; Mon, 20 Nov 2006 23:10:27 +0100 (CET) Date: Mon, 20 Nov 2006 23:10:26 +0100 From: Jeremie Le Hen To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20061120221026.GC20405@obiwan.tataz.chchile.org> References: <571883.4868.qm@web72011.mail.tp2.yahoo.com> <86irhlfvg2.fsf@dwp.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86irhlfvg2.fsf@dwp.des.no> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: trowa-4 , freebsd-hackers@freebsd.org Subject: Re: Process Debugging questions 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, 20 Nov 2006 22:10:02 -0000 Hi Dag-Erling, On Sat, Nov 11, 2006 at 11:51:57PM +0100, Dag-Erling Smørgrav wrote: > trowa-4 writes: > > FreeBSD provides the ptrace system call for controlling and > > debugging the execution of a process. > > > > An alternative to the ptrace system call is the /proc filesystem. > > > > The functionality provided by the /proc filesystem is the same as > > that provided by ptrace; if differs only in its interface. > > > > Are there having a better method or other method? > > They both suck, for different reasons. In theory, ptrace sucks less > than proc, but it lacks some of proc's functionality, and fixing that > is very hard. Would you take a little time to tell what ptrace lacks and possibly why it is so hard, please ? Thank you. -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 20 22:30:55 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 59A3716A47C for ; Mon, 20 Nov 2006 22:30:55 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp1-g19.free.fr (smtp1-g19.free.fr [212.27.42.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC53843D6D for ; Mon, 20 Nov 2006 22:30:35 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp1-g19.free.fr (Postfix) with ESMTP id B44BE68C6C; Mon, 20 Nov 2006 23:30:52 +0100 (CET) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 9EFAB9B46E; Mon, 20 Nov 2006 22:31:16 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 7BD3E405B; Mon, 20 Nov 2006 23:31:16 +0100 (CET) Date: Mon, 20 Nov 2006 23:31:16 +0100 To: Vini Engel Message-ID: <20061120223116.GE20405@obiwan.tataz.chchile.org> References: <455324F2.9090603@fugspbr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <455324F2.9090603@fugspbr.org> urom: Jeremie Le Hen User-Agent: Mutt/1.5.13 (2006-08-11) From: tataz@tataz.chchile.org (Jeremie Le Hen) X-Mailman-Approved-At: Mon, 20 Nov 2006 22:33:23 +0000 Cc: hackers@freebsd.org Subject: Re: Hardening FreeBSD, does anyone have any documentation that may help? 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, 20 Nov 2006 22:30:55 -0000 Hi Vini, On Thu, Nov 09, 2006 at 11:54:10PM +1100, Vini Engel wrote: > Hi guys, > > This may not seem to be the best place to ask for this but as this is > supposed to be a list for high level discussions I am assuming that some > people have must know how to harden FreeBSD and/or may have articles and > other docs that can be shared. > > We have a set of simple policies that are used to harden FreeBSD > machines but I would like make it better and also would like to see how > people do it out there so that I can pick the ideas that we find > interesting/useful for us here and improve our hardening skills. > > Our machines range from dns servers to mail servers and a few > router/firewalls. Some of them don't have to have anything special but > some others have to comply with the policy of the highly protected > networks that they live in, hence the reason why I want to improve my > hardening skills. > > Any info will be greatly appreciated! I have a patch to integrate ProPolice into FreeBSD RELENG_6. Though this is obviously not officially supported by FreeBSD, some people (including me) use it on production servers. It might be worth using it, depending on which security measures you are looking for. See http://tataz.chchile.org/~tataz/FreeBSD/SSP/ Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 20 22:33:41 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 EFBB216A4C9 for ; Mon, 20 Nov 2006 22:33:41 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp6-g19.free.fr (smtp6-g19.free.fr [212.27.42.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 052E843D45 for ; Mon, 20 Nov 2006 22:33:22 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp6-g19.free.fr (Postfix) with ESMTP id AA356435F1; Mon, 20 Nov 2006 23:33:40 +0100 (CET) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 8420C9B46E; Mon, 20 Nov 2006 22:34:07 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 599E4405B; Mon, 20 Nov 2006 23:34:07 +0100 (CET) Date: Mon, 20 Nov 2006 23:34:07 +0100 From: Jeremie Le Hen To: Vini Engel Message-ID: <20061120223407.GF20405@obiwan.tataz.chchile.org> References: <455324F2.9090603@fugspbr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <455324F2.9090603@fugspbr.org> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: hackers@freebsd.org Subject: Re: Hardening FreeBSD, does anyone have any documentation that may help? 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, 20 Nov 2006 22:33:42 -0000 Hi Vini, (Sorry for sending this mail twice, I've unintentionally removed the From: line in my previous email.) On Thu, Nov 09, 2006 at 11:54:10PM +1100, Vini Engel wrote: > Hi guys, > > This may not seem to be the best place to ask for this but as this is > supposed to be a list for high level discussions I am assuming that some > people have must know how to harden FreeBSD and/or may have articles and > other docs that can be shared. > > We have a set of simple policies that are used to harden FreeBSD > machines but I would like make it better and also would like to see how > people do it out there so that I can pick the ideas that we find > interesting/useful for us here and improve our hardening skills. > > Our machines range from dns servers to mail servers and a few > router/firewalls. Some of them don't have to have anything special but > some others have to comply with the policy of the highly protected > networks that they live in, hence the reason why I want to improve my > hardening skills. > > Any info will be greatly appreciated! I have a patch to integrate ProPolice into FreeBSD RELENG_6. Though this is obviously not officially supported by FreeBSD, some people (including me) use it on production servers. It might be worth using it, depending on which security measures you are looking for. See http://tataz.chchile.org/~tataz/FreeBSD/SSP/ Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 20 23:33:07 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 43B7716A494 for ; Mon, 20 Nov 2006 23:33:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3C9443E11 for ; Mon, 20 Nov 2006 23:30:38 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kAKNUeNd078961; Mon, 20 Nov 2006 18:30:40 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 20 Nov 2006 17:20:27 -0500 User-Agent: KMail/1.9.1 References: <20061117135553.14cfdaa1.phirerunner@comcast.net> In-Reply-To: <20061117135553.14cfdaa1.phirerunner@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611201720.28245.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 20 Nov 2006 18:30:40 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2209/Mon Nov 20 17:40:59 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Jared Yanovich Subject: Re: save process exit status in kevent NOTE_EXIT 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, 20 Nov 2006 23:33:07 -0000 On Friday 17 November 2006 13:55, Jared Yanovich wrote: > Any reason why this may be a bad idea? I think it'd be useful > for a pwait(1)-like utility (from Solaris). Sounds fine to me, I've committed it. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 21 04:18:04 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 9F75116A40F for ; Tue, 21 Nov 2006 04:18:04 +0000 (UTC) (envelope-from chrcoluk@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.228]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5646A43D46 for ; Tue, 21 Nov 2006 04:17:44 +0000 (GMT) (envelope-from chrcoluk@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so1791795wxc for ; Mon, 20 Nov 2006 20:18:03 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nJXGWX85GS2T1DnJROvjCR3RgCzvGwVDtu3lTwZAAo6rdAPTy3MSiIUGTgobHux1miFLG82bE6g016dxdsJ/GYypGc/EJcvCv5Uki8zEkHXQuHI7jtLy+ObHFDtemEQw/147WHwivLLPAuI8GKwb9mh44aCdbkWg+x147W9kvFE= Received: by 10.90.113.18 with SMTP id l18mr4549536agc.1164082682294; Mon, 20 Nov 2006 20:18:02 -0800 (PST) Received: by 10.35.29.20 with HTTP; Mon, 20 Nov 2006 20:18:01 -0800 (PST) Message-ID: <3aaaa3a0611202018v6db10bd9t64e8029efe1df1ec@mail.gmail.com> Date: Tue, 21 Nov 2006 04:18:01 +0000 From: Chris To: "Jeremie Le Hen" In-Reply-To: <20061120223407.GF20405@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <455324F2.9090603@fugspbr.org> <20061120223407.GF20405@obiwan.tataz.chchile.org> Cc: hackers@freebsd.org, Vini Engel Subject: Re: Hardening FreeBSD, does anyone have any documentation that may help? 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, 21 Nov 2006 04:18:04 -0000 On 20/11/06, Jeremie Le Hen wrote: > Hi Vini, > > (Sorry for sending this mail twice, I've unintentionally removed the > From: line in my previous email.) > > On Thu, Nov 09, 2006 at 11:54:10PM +1100, Vini Engel wrote: > > Hi guys, > > > > This may not seem to be the best place to ask for this but as this is > > supposed to be a list for high level discussions I am assuming that some > > people have must know how to harden FreeBSD and/or may have articles and > > other docs that can be shared. > > > > We have a set of simple policies that are used to harden FreeBSD > > machines but I would like make it better and also would like to see how > > people do it out there so that I can pick the ideas that we find > > interesting/useful for us here and improve our hardening skills. > > > > Our machines range from dns servers to mail servers and a few > > router/firewalls. Some of them don't have to have anything special but > > some others have to comply with the policy of the highly protected > > networks that they live in, hence the reason why I want to improve my > > hardening skills. > > > > Any info will be greatly appreciated! > > I have a patch to integrate ProPolice into FreeBSD RELENG_6. > Though this is obviously not officially supported by FreeBSD, > some people (including me) use it on production servers. It > might be worth using it, depending on which security measures > you are looking for. > > See http://tataz.chchile.org/~tataz/FreeBSD/SSP/ > > Regards, > > -- > Jeremie Le Hen > < jeremie at le-hen dot org >< ttz at chchile dot org > > _______________________________________________ > 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" > would love to see this in the base especially considering its been in dragonfly and openbsd for some years now. chris From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 21 05:25:04 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 9DBBF16A412 for ; Tue, 21 Nov 2006 05:25:04 +0000 (UTC) (envelope-from dunceor@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id E64A943D5F for ; Tue, 21 Nov 2006 05:24:43 +0000 (GMT) (envelope-from dunceor@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so1808512wxc for ; Mon, 20 Nov 2006 21:25:03 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=n5aZE48eUJTJVuEKz3eq5H3cuT+hS55TqoDtXCJqRA++AMdlWS5iGoGV3GI/48y843mmM++EH+2xLw3Kro4GjNs+dQw6i9giMiMWsJJTJJnUgEeLU8QO0nurFFWU8GGZ2Sg8KdZzQp7jLJQCsJCtQDGL9ENdQ6xT6mrmNaAh5yU= Received: by 10.70.47.19 with SMTP id u19mr11274306wxu.1164086702813; Mon, 20 Nov 2006 21:25:02 -0800 (PST) Received: by 10.70.75.3 with HTTP; Mon, 20 Nov 2006 21:25:02 -0800 (PST) Message-ID: <5d84cb30611202125p5df38ce3g7bd302a66377a52d@mail.gmail.com> Date: Tue, 21 Nov 2006 06:25:02 +0100 From: Dunceor To: "Kris Kennaway" In-Reply-To: <20061120191907.GA46313@xor.obsecurity.org> MIME-Version: 1.0 References: <45616BCF.5070606@caviumnetworks.com> <5d84cb30611200517j3f8dd9d7wb949f2d09e1b1b03@mail.gmail.com> <20061120191907.GA46313@xor.obsecurity.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, pnallimelli Subject: Re: Freeing free mbuff panic 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, 21 Nov 2006 05:25:04 -0000 On 11/20/06, Kris Kennaway wrote: > > On Mon, Nov 20, 2006 at 02:17:22PM +0100, Dunceor wrote: > > You should submit a complete error report and an actual panic log and > not > > just something you typed of the screen. It's very hard to find a bug > with > > that little information. > > True in general, but even if he does so it's unlikely he'll be able to > find a developer who is still interested in tracking down bugs in 4.x. > > Kris Also true but imaybe a developer wants to take a look at it and see if it's still present in later branches. Always when it's a bug that by default will be given low priority, give little information will give it even less priority =) From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 21 08:57:59 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 89B0C16A412 for ; Tue, 21 Nov 2006 08:57:59 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id C466B43D58 for ; Tue, 21 Nov 2006 08:57:37 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 6A9C12085; Tue, 21 Nov 2006 09:57:54 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 4EBA72083; Tue, 21 Nov 2006 09:57:53 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 1001) id 953D7B85E; Tue, 21 Nov 2006 09:57:53 +0100 (CET) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Jeremie Le Hen References: <571883.4868.qm@web72011.mail.tp2.yahoo.com> <86irhlfvg2.fsf@dwp.des.no> <20061120221026.GC20405@obiwan.tataz.chchile.org> Date: Tue, 21 Nov 2006 09:57:53 +0100 In-Reply-To: <20061120221026.GC20405@obiwan.tataz.chchile.org> (Jeremie Le Hen's message of "Mon, 20 Nov 2006 23:10:26 +0100") Message-ID: <86d57hjhwu.fsf@dwp.des.no> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: trowa-4 , freebsd-hackers@freebsd.org Subject: Re: Process Debugging questions 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, 21 Nov 2006 08:57:59 -0000 Jeremie Le Hen writes: > Dag-Erling Sm=F8rgrav writes: > > They both suck, for different reasons. In theory, ptrace sucks less > > than proc, but it lacks some of proc's functionality, and fixing that > > is very hard. > Would you take a little time to tell what ptrace lacks and possibly > why it is so hard, please ? The way ptrace works, you set debugging conditions using the ptrace(2) syscall and then use waitpid(2) and friends to wait for them to occur. For this to work, the traced process must be reparented to the debugger. If the traced process's real parent is waiting for its child, it will become very confused when waitpid(2) returns -1 because the child has vanished into thin air. For precisely the same reason, you can't follow forks with ptrace(). The only way I can see to solve this without modifying the ptrace API is to introduce a separate process hierarchy for traced processes. This is hard to do because you basically have to rewrite kern_wait() from scratch. The best solution would be to design a new debugging API from scratch. This is far from trivial, however, and should be done by (or in close cooperation with) someone intimately familiar with gdb(1) and similar tools. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 21 11:55:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 D346A16A531 for ; Tue, 21 Nov 2006 11:55:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 933E143D67 for ; Tue, 21 Nov 2006 11:55:16 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 257D646E71; Tue, 21 Nov 2006 06:55:37 -0500 (EST) Date: Tue, 21 Nov 2006 11:55:37 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= In-Reply-To: <86d57hjhwu.fsf@dwp.des.no> Message-ID: <20061121115333.N50450@fledge.watson.org> References: <571883.4868.qm@web72011.mail.tp2.yahoo.com> <86irhlfvg2.fsf@dwp.des.no> <20061120221026.GC20405@obiwan.tataz.chchile.org> <86d57hjhwu.fsf@dwp.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1037187573-1164110137=:50450" Cc: trowa-4 , freebsd-hackers@freebsd.org, Jeremie Le Hen Subject: Re: Process Debugging questions 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, 21 Nov 2006 11:55:38 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1037187573-1164110137=:50450 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 21 Nov 2006, Dag-Erling Sm=F8rgrav wrote: > Jeremie Le Hen writes: >> Dag-Erling Sm=F8rgrav writes: >>> They both suck, for different reasons. In theory, ptrace sucks less th= an=20 >>> proc, but it lacks some of proc's functionality, and fixing that is ver= y=20 >>> hard. >> Would you take a little time to tell what ptrace lacks and possibly why = it=20 >> is so hard, please ? > > The way ptrace works, you set debugging conditions using the ptrace(2)=20 > syscall and then use waitpid(2) and friends to wait for them to occur. Fo= r=20 > this to work, the traced process must be reparented to the debugger. If = the=20 > traced process's real parent is waiting for its child, it will become ver= y=20 > confused when waitpid(2) returns -1 because the child has vanished into t= hin=20 > air. For precisely the same reason, you can't follow forks with ptrace()= =2E > > The only way I can see to solve this without modifying the ptrace API is = to=20 > introduce a separate process hierarchy for traced processes. This is hard= to=20 > do because you basically have to rewrite kern_wait() from scratch. > > The best solution would be to design a new debugging API from scratch. Th= is=20 > is far from trivial, however, and should be done by (or in close cooperat= ion=20 > with) someone intimately familiar with gdb(1) and similar tools. DES and I had precisely this discussion at EuroBSDCon a week or two ago, in= =20 which we both reminded each other why ptrace() and procfs both suck. I thi= nk=20 the right answer is an improved system call API for debugging; I agree that= =20 ptrace() is better in theory, but the practical problems with it are=20 significant. Anyone who wants to start looking at a new API should make sure they look a= t=20 ptrace() and procfs across a range of platforms, and also look at Mach task= =20 ports and what they offer. One of the things we really can't do well with= =20 ptrace() today is inspect kernel state for a running process -- things like= =20 the VM layout, etc. We should make sure any next generation system allows= =20 this, because that feature alone is the reason why I sometimes mount procfs= =2E=20 :-) Robert N M Watson Computer Laboratory University of Cambridge --0-1037187573-1164110137=:50450-- From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 21 11:59:47 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 C93C416A403 for ; Tue, 21 Nov 2006 11:59:47 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87EE643DBB for ; Tue, 21 Nov 2006 11:59:07 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id D944946DA9; Tue, 21 Nov 2006 06:59:27 -0500 (EST) Date: Tue, 21 Nov 2006 11:59:27 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Jeremie Le Hen In-Reply-To: <20061120223407.GF20405@obiwan.tataz.chchile.org> Message-ID: <20061121115555.Y50450@fledge.watson.org> References: <455324F2.9090603@fugspbr.org> <20061120223407.GF20405@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org, Vini Engel Subject: Re: Hardening FreeBSD, does anyone have any documentation that may help? 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, 21 Nov 2006 11:59:47 -0000 On Mon, 20 Nov 2006, Jeremie Le Hen wrote: > On Thu, Nov 09, 2006 at 11:54:10PM +1100, Vini Engel wrote: > >> This may not seem to be the best place to ask for this but as this is >> supposed to be a list for high level discussions I am assuming that some >> people have must know how to harden FreeBSD and/or may have articles and >> other docs that can be shared. >> >> We have a set of simple policies that are used to harden FreeBSD machines >> but I would like make it better and also would like to see how people do it >> out there so that I can pick the ideas that we find interesting/useful for >> us here and improve our hardening skills. >> >> Our machines range from dns servers to mail servers and a few >> router/firewalls. Some of them don't have to have anything special but some >> others have to comply with the policy of the highly protected networks that >> they live in, hence the reason why I want to improve my hardening skills. >> >> Any info will be greatly appreciated! > > I have a patch to integrate ProPolice into FreeBSD RELENG_6. Though this is > obviously not officially supported by FreeBSD, some people (including me) > use it on production servers. It might be worth using it, depending on > which security measures you are looking for. > > See http://tataz.chchile.org/~tataz/FreeBSD/SSP/ FYI, Silby gave a nice mini-talk/discussion at EuroBSDCon on the topic of gcc4 security features. It seems like there's a lot of support for having these things in FreeBSD, but a strong reluctance to have large outstanding patchsets against the compiler and build chain, hence the continued "strategy" of waiting for them to arrive in gcc4. Most questions boiled down to: - What are the ABI impacts? Assuming that protection features arrive and depart, and that reasonable application backward compatibility is required for programs and libraries. Of particular interest was the case where we turn on a protection feature in X.Y and discover that this was a bad idea, so turn it off in X.Y+1. - What are the performance characteristics in a variety of real-world workloads? One of the universal comments was that we really think it's great that a patch is being maintained against current FreeBSD releases/branches with this functionality. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 21 14:09:47 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 0785016A415; Tue, 21 Nov 2006 14:09:47 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB5C643D5A; Tue, 21 Nov 2006 14:09:23 +0000 (GMT) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A5EA55.dip.t-dialin.net [84.165.234.85]) by redbull.bpaserver.net (Postfix) with ESMTP id 50B632E1FF; Tue, 21 Nov 2006 15:09:42 +0100 (CET) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 476CE5B4C35; Tue, 21 Nov 2006 15:09:42 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.13.8/8.13.8/Submit) id kALE9f6c011654; Tue, 21 Nov 2006 15:09:41 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Tue, 21 Nov 2006 15:09:41 +0100 Message-ID: <20061121150941.wlwmfw8u0w0c444k@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Tue, 21 Nov 2006 15:09:41 +0100 From: Alexander Leidinger To: Robert Watson References: <571883.4868.qm@web72011.mail.tp2.yahoo.com> <86irhlfvg2.fsf@dwp.des.no> <20061120221026.GC20405@obiwan.tataz.chchile.org> <86d57hjhwu.fsf@dwp.des.no> <20061121115333.N50450@fledge.watson.org> In-Reply-To: <20061121115333.N50450@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) / FreeBSD-7.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-15.287, required 6, autolearn=not spam, BAYES_00 -15.00, DK_POLICY_SIGNSOME 0.00, FORGED_RCVD_HELO 0.14, SMILEY -0.50, TW_OC 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Tue, 21 Nov 2006 14:12:52 +0000 Cc: trowa-4 , Dag-Erling =?utf-8?b?U23DuHJncmF2?= , Jeremie Le Hen , freebsd-hackers@FreeBSD.org Subject: Re: Process Debugging questions 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, 21 Nov 2006 14:09:47 -0000 Quoting Robert Watson (from Tue, 21 Nov 2006 11:55:37 +0000 (GMT)): > Anyone who wants to start looking at a new API should make sure they > look at ptrace() and procfs across a range of platforms, and also look > at Mach task ports and what they offer. One of the things we really > can't do well with ptrace() today is inspect kernel state for a running > process -- things like the VM layout, etc. We should make sure any > next generation system allows this, because that feature alone is the > reason why I sometimes mount procfs. :-) Can you please elaborate what features you have in mind which DTrace isn't able to deliver? Bye, Alexander. -- Not every question deserves an answer. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 21 14:20:34 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 28AAC16A412; Tue, 21 Nov 2006 14:20:34 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from antivirus.uni-rostock.de (mailrelay1.uni-rostock.de [139.30.8.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBD2143D70; Tue, 21 Nov 2006 14:19:51 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from antivirus.exch.rz.uni-rostock.de ([127.0.0.1]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Tue, 21 Nov 2006 15:20:12 +0100 Received: from antivirus.uni-rostock.de (unverified) by antivirus.exch.rz.uni-rostock.de (Clearswift SMTPRS 5.2.5) with ESMTP id ; Tue, 21 Nov 2006 15:20:11 +0100 Received: from mail pickup service by antivirus.uni-rostock.de with Microsoft SMTPSVC; Tue, 21 Nov 2006 15:20:11 +0100 X-SCL: 1 38.74% Received: from mail.uni-rostock.de ([139.30.8.11]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Tue, 21 Nov 2006 15:20:06 +0100 Received: from britannica.bec.de (storm.stura.uni-rostock.de [139.30.252.72]) by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0J930080I3TIDL@mail.uni-rostock.de>; Tue, 21 Nov 2006 15:20:06 +0100 (MET) Received: by britannica.bec.de (Postfix, from userid 1000) id E3F1F9A35; Tue, 21 Nov 2006 15:19:58 +0100 (CET) Date: Tue, 21 Nov 2006 15:19:58 +0100 From: Joerg Sonnenberger In-reply-to: <20061121115555.Y50450@fledge.watson.org> To: freebsd-hackers@freebsd.org, hackers@freebsd.org Mail-followup-to: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-id: <20061121141958.GB721@britannica.bec.de> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) References: <455324F2.9090603@fugspbr.org> <20061120223407.GF20405@obiwan.tataz.chchile.org> <20061121115555.Y50450@fledge.watson.org> X-OriginalArrivalTime: 21 Nov 2006 14:20:06.0793 (UTC) FILETIME=[24CBEF90:01C70D78] Cc: Subject: Re: Hardening FreeBSD, does anyone have any documentation that may help? 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, 21 Nov 2006 14:20:34 -0000 On Tue, Nov 21, 2006 at 11:59:27AM +0000, Robert Watson wrote: > FYI, Silby gave a nice mini-talk/discussion at EuroBSDCon on the topic of > gcc4 security features. It seems like there's a lot of support for having > these things in FreeBSD, but a strong reluctance to have large outstanding > patchsets against the compiler and build chain, hence the continued > "strategy" of waiting for them to arrive in gcc4. Most questions boiled > down to: The code is integrated in GCC 4.1, patching if needed at all is quite contained. > - What are the ABI impacts? Assuming that protection features arrive and > depart, and that reasonable application backward compatibility is required > for programs and libraries. Of particular interest was the case where we > turn on a protection feature in X.Y and discover that this was a bad idea, > so turn it off in X.Y+1. The ABI impact is limited to the stack guard cookie, the initialisation function and the failure handler. Three different solutions can be used: (1) The code can be part of a separate library (libssp). (2) The code can be part of libc (DragonFly, OpenBSD and glibc do this). (3) Like (2), but the cookie is part of the Thread Control Block, e.g. accessible via %gs. This is done on newer glibc systems and has the advantage of avoiding PIC references. > - What are the performance characteristics in a variety of real-world > workloads? The original benchmarks done with Propolice by IBM suggest typical degrations in the area of 2%-5%, depending on how many functions are called and not inlined and how many of them need to get the protection. The site of Etoh has more details. Joerg From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 21 14:20:34 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 28AAC16A412; Tue, 21 Nov 2006 14:20:34 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from antivirus.uni-rostock.de (mailrelay1.uni-rostock.de [139.30.8.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBD2143D70; Tue, 21 Nov 2006 14:19:51 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from antivirus.exch.rz.uni-rostock.de ([127.0.0.1]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Tue, 21 Nov 2006 15:20:12 +0100 Received: from antivirus.uni-rostock.de (unverified) by antivirus.exch.rz.uni-rostock.de (Clearswift SMTPRS 5.2.5) with ESMTP id ; Tue, 21 Nov 2006 15:20:11 +0100 Received: from mail pickup service by antivirus.uni-rostock.de with Microsoft SMTPSVC; Tue, 21 Nov 2006 15:20:11 +0100 X-SCL: 1 38.74% Received: from mail.uni-rostock.de ([139.30.8.11]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Tue, 21 Nov 2006 15:20:06 +0100 Received: from britannica.bec.de (storm.stura.uni-rostock.de [139.30.252.72]) by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0J930080I3TIDL@mail.uni-rostock.de>; Tue, 21 Nov 2006 15:20:06 +0100 (MET) Received: by britannica.bec.de (Postfix, from userid 1000) id E3F1F9A35; Tue, 21 Nov 2006 15:19:58 +0100 (CET) Date: Tue, 21 Nov 2006 15:19:58 +0100 From: Joerg Sonnenberger In-reply-to: <20061121115555.Y50450@fledge.watson.org> To: freebsd-hackers@freebsd.org, hackers@freebsd.org Mail-followup-to: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-id: <20061121141958.GB721@britannica.bec.de> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) References: <455324F2.9090603@fugspbr.org> <20061120223407.GF20405@obiwan.tataz.chchile.org> <20061121115555.Y50450@fledge.watson.org> X-OriginalArrivalTime: 21 Nov 2006 14:20:06.0793 (UTC) FILETIME=[24CBEF90:01C70D78] Cc: Subject: Re: Hardening FreeBSD, does anyone have any documentation that may help? 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, 21 Nov 2006 14:20:34 -0000 On Tue, Nov 21, 2006 at 11:59:27AM +0000, Robert Watson wrote: > FYI, Silby gave a nice mini-talk/discussion at EuroBSDCon on the topic of > gcc4 security features. It seems like there's a lot of support for having > these things in FreeBSD, but a strong reluctance to have large outstanding > patchsets against the compiler and build chain, hence the continued > "strategy" of waiting for them to arrive in gcc4. Most questions boiled > down to: The code is integrated in GCC 4.1, patching if needed at all is quite contained. > - What are the ABI impacts? Assuming that protection features arrive and > depart, and that reasonable application backward compatibility is required > for programs and libraries. Of particular interest was the case where we > turn on a protection feature in X.Y and discover that this was a bad idea, > so turn it off in X.Y+1. The ABI impact is limited to the stack guard cookie, the initialisation function and the failure handler. Three different solutions can be used: (1) The code can be part of a separate library (libssp). (2) The code can be part of libc (DragonFly, OpenBSD and glibc do this). (3) Like (2), but the cookie is part of the Thread Control Block, e.g. accessible via %gs. This is done on newer glibc systems and has the advantage of avoiding PIC references. > - What are the performance characteristics in a variety of real-world > workloads? The original benchmarks done with Propolice by IBM suggest typical degrations in the area of 2%-5%, depending on how many functions are called and not inlined and how many of them need to get the protection. The site of Etoh has more details. Joerg From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 21 14:22:24 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org 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 7506916A47B for ; Tue, 21 Nov 2006 14:22:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8BF943D5E for ; Tue, 21 Nov 2006 14:21:37 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 351B846E4F; Tue, 21 Nov 2006 09:21:59 -0500 (EST) Date: Tue, 21 Nov 2006 14:21:59 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Leidinger In-Reply-To: <20061121150941.wlwmfw8u0w0c444k@webmail.leidinger.net> Message-ID: <20061121142005.T63599@fledge.watson.org> References: <571883.4868.qm@web72011.mail.tp2.yahoo.com> <86irhlfvg2.fsf@dwp.des.no> <20061120221026.GC20405@obiwan.tataz.chchile.org> <86d57hjhwu.fsf@dwp.des.no> <20061121115333.N50450@fledge.watson.org> <20061121150941.wlwmfw8u0w0c444k@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: trowa-4 , Dag-Erling =?utf-8?b?U23DuHJncmF2?= , Jeremie Le Hen , freebsd-hackers@FreeBSD.org Subject: Re: Process Debugging questions 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, 21 Nov 2006 14:22:24 -0000 On Tue, 21 Nov 2006, Alexander Leidinger wrote: > Quoting Robert Watson (from Tue, 21 Nov 2006 11:55:37 > +0000 (GMT)): > >> Anyone who wants to start looking at a new API should make sure they look >> at ptrace() and procfs across a range of platforms, and also look at Mach >> task ports and what they offer. One of the things we really can't do well >> with ptrace() today is inspect kernel state for a running process -- things >> like the VM layout, etc. We should make sure any next generation system >> allows this, because that feature alone is the reason why I sometimes mount >> procfs. :-) > > Can you please elaborate what features you have in mind which DTrace isn't > able to deliver? /proc/curproc/map Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 21 14:57:49 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org 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 B64C916A492 for ; Tue, 21 Nov 2006 14:57:49 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F61F43DC7 for ; Tue, 21 Nov 2006 14:56:23 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 48CD546CBF; Tue, 21 Nov 2006 09:56:32 -0500 (EST) Date: Tue, 21 Nov 2006 14:56:32 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Leidinger In-Reply-To: <20061121154714.03vzlj72sss88k4c@webmail.leidinger.net> Message-ID: <20061121144831.Y63599@fledge.watson.org> References: <571883.4868.qm@web72011.mail.tp2.yahoo.com> <86irhlfvg2.fsf@dwp.des.no> <20061120221026.GC20405@obiwan.tataz.chchile.org> <86d57hjhwu.fsf@dwp.des.no> <20061121115333.N50450@fledge.watson.org> <20061121150941.wlwmfw8u0w0c444k@webmail.leidinger.net> <20061121142005.T63599@fledge.watson.org> <20061121154714.03vzlj72sss88k4c@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: trowa-4 , Dag-Erling =?utf-8?b?U23Dg8K4cmdyYXY=?= , Jeremie Le Hen , freebsd-hackers@FreeBSD.org Subject: Re: Process Debugging questions 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, 21 Nov 2006 14:57:49 -0000 On Tue, 21 Nov 2006, Alexander Leidinger wrote: > Quoting Robert Watson (from Tue, 21 Nov 2006 14:21:59 > +0000 (GMT)): > >> On Tue, 21 Nov 2006, Alexander Leidinger wrote: >> >>> Quoting Robert Watson (from Tue, 21 Nov 2006 >>> 11:55:37 +0000 (GMT)): >>> >>>> Anyone who wants to start looking at a new API should make sure they look >>>> at ptrace() and procfs across a range of platforms, and also look at Mach >>>> task ports and what they offer. One of the things we really can't do >>>> well with ptrace() today is inspect kernel state for a running process -- >>>> things like the VM layout, etc. We should make sure any next generation >>>> system allows this, because that feature alone is the reason why I >>>> sometimes mount procfs. :-) >>> >>> Can you please elaborate what features you have in mind which DTrace isn't >>> able to deliver? >> >> /proc/curproc/map > > With DTrace we have access to a lot of stuff. I think this is only a case of > writting the right dtrace script (intercepting malloc/free/sbrk/mmap/... > should allow for more sophisticated output). DTrace has access to some but not all of this information, and even then only if you've been tracing since inception. Part of the value of /proc/pid/map is that you can ask the question about process mappings at any time, even if you've only just decided it's interesting to ask; with DTrace you have to be tracing all along and know in advance that it's a question you're going to ask. DTrace on the user app also doesn't have access to kernel-generated mappings in the address space, such as the mappings created at exec()-time itself. We require two things, I think: - A correctly-written, well-implemented, thread and inheritable process aware debugging mechanism. This would allow querying the kernel for relevent state (thread lists, etc), setting breakpoints, allowing memory access, stepping the process, breaking on system call entry/exit (required for truss), and so on. It would not require the debugged process to be reparented or deliver events using waitpid. - A general mechanism for querying detailed kernel state about a process, such as its VM mappings, file descriptor state, etc. Things that aren't normal process monitoring stuff (i.e., require debugging privileges on the target process). Currently, procfs provides this combined facility. On Mac OS X, Mach task, thread, VM, etc ports provide this combined facility. I would like a system call driven mechanism with those facilities. I'm reluctant to stuff the latter half into sysctl as I prefer that sysctl generally hold mostly public information rather than having lots and lots of access control. Combining the functionality makes some amount of sense as both sets of functionality will tend to be used in debugging and may be useful in the same application. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 21 15:09:11 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 AA75A16A492 for ; Tue, 21 Nov 2006 15:09:11 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp6-g19.free.fr (smtp6-g19.free.fr [212.27.42.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0807F43D7C for ; Tue, 21 Nov 2006 15:08:43 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp6-g19.free.fr (Postfix) with ESMTP id 9E65343676 for ; Tue, 21 Nov 2006 16:09:05 +0100 (CET) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id D374E9B46E for ; Tue, 21 Nov 2006 15:09:28 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id CAFD14063; Tue, 21 Nov 2006 16:09:28 +0100 (CET) Date: Tue, 21 Nov 2006 16:09:28 +0100 From: Jeremie Le Hen To: freebsd-hackers@freebsd.org Message-ID: <20061121150928.GJ20405@obiwan.tataz.chchile.org> References: <455324F2.9090603@fugspbr.org> <20061120223407.GF20405@obiwan.tataz.chchile.org> <20061121115555.Y50450@fledge.watson.org> <20061121141958.GB721@britannica.bec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061121141958.GB721@britannica.bec.de> User-Agent: Mutt/1.5.13 (2006-08-11) Subject: Re: Hardening FreeBSD, does anyone have any documentation that may help? 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, 21 Nov 2006 15:09:11 -0000 Robert, Joerg, thank you for replying. On Tue, Nov 21, 2006 at 03:19:58PM +0100, Joerg Sonnenberger wrote: > On Tue, Nov 21, 2006 at 11:59:27AM +0000, Robert Watson wrote: > > FYI, Silby gave a nice mini-talk/discussion at EuroBSDCon on the topic of > > gcc4 security features. It seems like there's a lot of support for having > > these things in FreeBSD, but a strong reluctance to have large outstanding > > patchsets against the compiler and build chain, hence the continued > > "strategy" of waiting for them to arrive in gcc4. Most questions boiled > > down to: I fully understand this reluctance and that's why I am struggling to maintain a patch applicable to the latest RELENG_6 and CURRENT. > > - What are the ABI impacts? Assuming that protection features arrive and > > depart, and that reasonable application backward compatibility is required > > for programs and libraries. Of particular interest was the case where we > > turn on a protection feature in X.Y and discover that this was a bad idea, > > so turn it off in X.Y+1. > > The ABI impact is limited to the stack guard cookie, the initialisation > function and the failure handler. Three different solutions can be used: > (1) The code can be part of a separate library (libssp). > (2) The code can be part of libc (DragonFly, OpenBSD and glibc do this). > (3) Like (2), but the cookie is part of the Thread Control Block, e.g. > accessible via %gs. This is done on newer glibc systems and has the > advantage of avoiding PIC references. Concerning backward compatibility, there are two cases. The first one is ProPolice being integrated to the source tree (I mean the GCC stuff as well as the SSP symbols in libc). Turning the feature on or off is just the matter of using a compilation flag (toggled by some build knob). Since the SSP symbols are in libc at any rate, you won't have any problem to go back to a non-SSP world. Even SSP-protected third-party applications will simply depend on SSP symbols in libc until they are recompiled. The second one is ProPolice being maintained as an external patchset as it is currently. This is trickier because the user may want to remove the patch and will thereafter have a libc without SSP-symbols, breaking *all* applications requiring them. Even installworld will break in this case, since libc.so is installed quite early. I've created libssp.so that contains SSP symbols, so users can temporarily circumvent this problem with LD_PRELOAD. This is described in the FAQ available on my website. > > - What are the performance characteristics in a variety of real-world > > workloads? > > The original benchmarks done with Propolice by IBM suggest typical > degrations in the area of 2%-5%, depending on how many functions are > called and not inlined and how many of them need to get the protection. > The site of Etoh has more details. When I release this ProPolice patch, I made a classical benchmark, building world thrice (available on my website as well): WITHOUT_SSP WITH_SSP Overhead (%) real 319m45.465s 323m31.551s 1.1% user 180m5.823s 182m48.844s 1.5% sys 23m18.855s 23m50.322s 2.2% -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 21 14:47:22 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 01D3316A415; Tue, 21 Nov 2006 14:47:22 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA4BE43D64; Tue, 21 Nov 2006 14:46:58 +0000 (GMT) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A5EA55.dip.t-dialin.net [84.165.234.85]) by redbull.bpaserver.net (Postfix) with ESMTP id 015632E078; Tue, 21 Nov 2006 15:47:14 +0100 (CET) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 0C8BC5B4C35; Tue, 21 Nov 2006 15:47:15 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.13.8/8.13.8/Submit) id kALElElJ018043; Tue, 21 Nov 2006 15:47:14 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Tue, 21 Nov 2006 15:47:14 +0100 Message-ID: <20061121154714.03vzlj72sss88k4c@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Tue, 21 Nov 2006 15:47:14 +0100 From: Alexander Leidinger To: Robert Watson References: <571883.4868.qm@web72011.mail.tp2.yahoo.com> <86irhlfvg2.fsf@dwp.des.no> <20061120221026.GC20405@obiwan.tataz.chchile.org> <86d57hjhwu.fsf@dwp.des.no> <20061121115333.N50450@fledge.watson.org> <20061121150941.wlwmfw8u0w0c444k@webmail.leidinger.net> <20061121142005.T63599@fledge.watson.org> In-Reply-To: <20061121142005.T63599@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) / FreeBSD-7.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-15.287, required 6, autolearn=not spam, BAYES_00 -15.00, DK_POLICY_SIGNSOME 0.00, FORGED_RCVD_HELO 0.14, SMILEY -0.50, TW_OC 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Tue, 21 Nov 2006 15:31:12 +0000 Cc: trowa-4 , Dag-Erling =?utf-8?b?U23Dg8K4cmdyYXY=?= , Jeremie Le Hen , freebsd-hackers@FreeBSD.org Subject: Re: Process Debugging questions 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, 21 Nov 2006 14:47:22 -0000 Quoting Robert Watson (from Tue, 21 Nov 2006 =20 14:21:59 +0000 (GMT)): > > On Tue, 21 Nov 2006, Alexander Leidinger wrote: > >> Quoting Robert Watson (from Tue, 21 Nov 2006 =20 >> 11:55:37 +0000 (GMT)): >> >>> Anyone who wants to start looking at a new API should make sure =20 >>> they look at ptrace() and procfs across a range of platforms, and =20 >>> also look at Mach task ports and what they offer. One of the =20 >>> things we really can't do well with ptrace() today is inspect =20 >>> kernel state for a running process -- things like the VM layout, =20 >>> etc. We should make sure any next generation system allows this, =20 >>> because that feature alone is the reason why I sometimes mount =20 >>> procfs. :-) >> >> Can you please elaborate what features you have in mind which =20 >> DTrace isn't able to deliver? > > /proc/curproc/map With DTrace we have access to a lot of stuff. I think this is only a =20 case of writting the right dtrace script (intercepting =20 malloc/free/sbrk/mmap/... should allow for more sophisticated output). Bye, Alexander. --=20 http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 21 18:22:50 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 F0A1B16A47E for ; Tue, 21 Nov 2006 18:22:50 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id D984F43E77 for ; Tue, 21 Nov 2006 18:21:50 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.7/8.13.4) with ESMTP id kALILmsb074439; Tue, 21 Nov 2006 10:21:48 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.13.7/8.13.4/Submit) id kALILX2a074434; Tue, 21 Nov 2006 10:21:33 -0800 (PST) Date: Tue, 21 Nov 2006 10:21:33 -0800 (PST) From: Matthew Dillon Message-Id: <200611211821.kALILX2a074434@apollo.backplane.com> To: Yar Tikhiy References: <20061029140716.GA12058@comp.chem.msu.su> <20061029152227.GA11826@walton.maths.tcd.ie> <006801c6fb77$e4e30100$1200a8c0@gsicomp.on.ca> <20061030130519.GE27062@comp.chem.msu.su> <20061030134737.GF1627@deviant.kiev.zoral.com.ua> <20061118095400.GE68439@comp.chem.msu.su> <20061118110544.GN1841@deviant.kiev.zoral.com.ua> <20061118180424.GC80527@comp.chem.msu.su> Cc: Kostik Belousov , David Malone , hackers@freebsd.org Subject: Re: File trees: the deeper, the weirder 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, 21 Nov 2006 18:22:51 -0000 It's possible to allow intermediate directory vnodes to be reclaimed by adjusting cache_leaf_check(), etc, but doing so will cause the kernel getcwd to fail a lot more often. This is, in fact, how reclamation worked before I added cache_leaf_check(). That work was never completed in FreeBSD (I finished it in DragonFly). It probably wouldn't hurt a whole lot to nerf it, since I don't think there is anyone in FreeBSDland really interested in converting the namecache from a vnode-centric topology to an independant namecache-centric topology like we have in DragonFly. Still, I wouldn't remove it entirely. Directory vnodes have a tendency to go by the wayside during scans (tar, find, etc) and get recycled far earlier then they otherwise should. The bigger issue with regards to vnode recycling is the VM page cache. Vnodes with cached VM pages do not usually get recycled and the vnode system relies on the VM system's page recycling to eventually free up all the VM pages associated with a vnode and make it recyclable. But on modern systems with tons of physical memory accessing lots of tiny files it is possible to have plenty of free memory but still have too many unrecyclable vnodes due to the presence of cached VM pages for those vnodes. There is code in vlrureclaim() that tries to solve this problem by calculating a 'trigger' point -- all VM objects with less then the trigger point number of cached VM pages are considered recyclable. See line 566 in vfs_subr.c in FreeBSD HEAD. This calculation is fairly primitive in FreeBSD. There is a more sophisticated version in DragonFly which scales the trigger point up when the vnode recycler detects that it is having problems. You should look at it. Line 501 in kern/vfs_mount.c in DragonFly HEAD is a good starting point. -Matt From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 22 09:57:34 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 D062916A40F for ; Wed, 22 Nov 2006 09:57:34 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from talk.nabble.com (www.nabble.com [72.21.53.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF24843D46 for ; Wed, 22 Nov 2006 09:57:06 +0000 (GMT) (envelope-from bounces@nabble.com) Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GmorF-0005BD-TC for freebsd-hackers@freebsd.org; Wed, 22 Nov 2006 01:57:33 -0800 Message-ID: <7488058.post@talk.nabble.com> Date: Wed, 22 Nov 2006 01:57:33 -0800 (PST) From: wd To: freebsd-hackers@freebsd.org In-Reply-To: <455CAF73.9060808@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: wd@denx.de References: <2f3a439f0611142305n441d3adwf7738ae40f9103e3@mail.gmail.com> <200611151101.kAFB1c8a089422@lurza.secnetix.de> <2f3a439f0611150355n3dd81845ydbeb0a7b597fb087@mail.gmail.com> <200611151344.kAFDiZmh097517@lurza.secnetix.de> <2f3a439f0611160038g5349f25bn8a1970120bc52b0@mail.gmail.com> <200611161335.kAGDZKH4063973@lurza.secnetix.de> <2f3a439f0611160556o6e643561sf45bccab2ad769ad@mail.gmail.com> <200611161457.kAGEvp3F068251@lurza.secnetix.de> <2f3a439f0611160836r3c88c3f4ja9cc5a5f4b78a244@mail.gmail.com> <200611161805.kAGI5w9b013112@peedub.jennejohn.org> <455CAF73.9060808@semihalf.com> X-Mailman-Approved-At: Wed, 22 Nov 2006 12:39:10 +0000 Subject: Re: FreeBSD and U-Boot -- was: Ramdisk 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, 22 Nov 2006 09:57:34 -0000 Rafal Jaworowski wrote: > > Once this is agreed and prototyped/tested the changes will by > contributed to U-Boot (I'm sure, too, Wolfgang will be glad to see those;) > Of course I will. Just send me a pointer to your git repo to pull from :-) Best regards, Wolfgang Denk -- View this message in context: http://www.nabble.com/Ramdisk-support-tf2634378.html#a7488058 Sent from the freebsd-hackers mailing list archive at Nabble.com. From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 22 16:16:18 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 D59C516A51E; Wed, 22 Nov 2006 16:16:18 +0000 (UTC) (envelope-from Johannes.Kruger@nokia.com) Received: from mgw-ext13.nokia.com (mgw-ext13.nokia.com [131.228.20.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC1A843D45; Wed, 22 Nov 2006 16:15:48 +0000 (GMT) (envelope-from Johannes.Kruger@nokia.com) Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-ext13.nokia.com (Switch-3.1.10/Switch-3.1.10) with ESMTP id kAMEktJZ027876; Wed, 22 Nov 2006 16:48:59 +0200 Received: from daebh101.NOE.Nokia.com ([10.241.35.111]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 22 Nov 2006 16:46:59 +0200 Received: from daebe102.NOE.Nokia.com ([10.241.35.115]) by daebh101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 22 Nov 2006 08:46:55 -0600 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Wed, 22 Nov 2006 08:46:54 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Core dumps not working via scsi_da and mpt driver Thread-Index: Acb5/hoYxESEZOImQZqhF+h26wUNXgAEbNCgBN/5wBAALQTVMA== From: To: , , , X-OriginalArrivalTime: 22 Nov 2006 14:46:55.0301 (UTC) FILETIME=[0DF48750:01C70E45] X-Nokia-AV: Clean X-Mailman-Approved-At: Wed, 22 Nov 2006 16:32:30 +0000 Cc: Subject: Core dumps not working via scsi_da and mpt driver 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, 22 Nov 2006 16:16:18 -0000 Forcing a graceful panic, the exact message I get is: --------------- snip -------------------- # sysctl -w debug.kdb.panic=3D1 debug.kdb.panic: 0panic: kdb_sysctl_panic cpuid =3D 0 KDB: enter: panic [thread pid 3438 tid 100053 ] Stopped at kdb_enter+0x2b: nop db> panic cpuid =3D 0 Uptime: 21h29m12s Physical memory: 501 MB Dumping 75 MB:Aborting dump due to I/O error. status =3D=3D 0x58, scsi status =3D=3D 0x0 ** DUMP FAILED (ERROR 5) ** Automatic reboot in 15 seconds - press a key on the console to abort --------------- snip -------------------- The string "Aborting dump due to I/O error" is reported by scsi_da.c Johan -----Original Message----- From: Kruger Johannes (Nokia-ES/Boston)=20 Sent: Tuesday, November 21, 2006 12:26 PM To: 'mjacob@freebsd.org'; 'freebsd-scsi@freebsd.org' Cc: Kruger Johannes (Nokia-ES/Boston) Subject: RE: CAM_NEW_TRAN Hi Matthew. I tried forcing a core dump on the LSI-1064 and LSI-1064E controller. It does not seem to work via the mpt driver. The core dump is set to go to the usual place, the swap partition. # mount /dev/da0s1a on / (ufs, local) devfs on /dev (devfs, local) /dev/da0s1e on /tmp (ufs, local, soft-updates) /dev/da0s1f on /usr (ufs, local, soft-updates) /dev/da0s1d on /var (ufs, local, soft-updates) No RAID setup, just normal SATA disk on PHY0, works fine except for core dump. Did a bit of debug checking: I see that interrupts are turned of when doing a core dump. This looks ok since I see there is polling routines registered, and I can see them being called also. The message with what it fails is: ------------------ snip --------------------- Aborting dump due to I/O error. status =3D=3D 0x58, scsi status =3D=3D 0x0 i/o error Rebooting... ------------------ snip --------------------- I added some debugging code and it looks like it calls mpt_intr lots of times, and also mpt_action, which is correct. After looping (or entering via polling) the mpt_intr routine multiple times, the bit MPI_ADDRESS_REPLY_A_BIT is set. The execution path in "mpt_scsi_reply_handler" changes from a "context only reply" to a call to do "mpt_scsi_reply_frame_handler". In this "mpt_scsi_reply_frame_handler" call the ioc_status =3D 0x4b = which is: #define MPI_IOCSTATUS_SCSI_IOC_TERMINATED (0x004B) Any idea why this happens ? Thanks Johan . From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 22 20:02:54 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 40B3216A4FB for ; Wed, 22 Nov 2006 20:02:54 +0000 (UTC) (envelope-from bharmaji@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41EE643F5B for ; Wed, 22 Nov 2006 20:02:02 +0000 (GMT) (envelope-from bharmaji@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so597010nfc for ; Wed, 22 Nov 2006 12:02:30 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=b/47BRZ3gp95k+ySkgfIYPrWUooUajX2krazs/DJ4EamvMgOoFb+QdbOXZWVW+SGmzAISRqBEIn77E4Si7dtj6AfHeGly3sJkb5960bbuJLPZ+cAz8UDtzDIwyMU4aWk3IhVcU2NGiTZrvtef9YGVU6EHhh1CmCTwwss76fhn5U= Received: by 10.82.123.16 with SMTP id v16mr1296749buc.1164225750285; Wed, 22 Nov 2006 12:02:30 -0800 (PST) Received: by 10.82.146.3 with HTTP; Wed, 22 Nov 2006 12:02:30 -0800 (PST) Message-ID: <67beabb0611221202l2bb9a320o601feff7e7b3aa68@mail.gmail.com> Date: Wed, 22 Nov 2006 12:02:30 -0800 From: "Bharma Ji" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Is there any way to avoid copy between the kernel and userland 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, 22 Nov 2006 20:02:54 -0000 Hi I am looking for any FreeBSD facility that will allow a userland process to pass data to the kernel without doing a copyin or copyout e.g. using a shared data structure (queue? ) for example? Any pointers will be useful Thanks From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 22 20:37:17 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 A3B4716A577 for ; Wed, 22 Nov 2006 20:37:17 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE85243DF2 for ; Wed, 22 Nov 2006 20:35:21 +0000 (GMT) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Gmyok-0004NF-Kw for freebsd-hackers@freebsd.org; Wed, 22 Nov 2006 21:35:39 +0100 Received: from 89-172-62-47.adsl.net.t-com.hr ([89.172.62.47]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Nov 2006 21:35:38 +0100 Received: from ivoras by 89-172-62-47.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Nov 2006 21:35:38 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Wed, 22 Nov 2006 21:35:20 +0100 Lines: 13 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 89-172-62-47.adsl.net.t-com.hr User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) Sender: news Subject: Kqueue write event position? 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, 22 Nov 2006 20:37:17 -0000 >From the kqueue(2) manual: """ EVFILT_VNODE Takes a file descriptor as the identifier and the events to watch for in fflags, and returns when one or more of the requested events occurs on the descriptor. The events to monitor are:... """ I'm interested in NOTE_WRITE, but is there a way to find out where has the write been performed (position and length)? If not, how difficult would it be to expand the API so this information is included? From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 22 21:32:18 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 CFBD016A51E for ; Wed, 22 Nov 2006 21:32:18 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01F3F440D0 for ; Wed, 22 Nov 2006 21:15:56 +0000 (GMT) (envelope-from dudu@dudu.ro) Received: by nz-out-0102.google.com with SMTP id i11so204255nzh for ; Wed, 22 Nov 2006 13:16:03 -0800 (PST) Received: by 10.65.188.20 with SMTP id q20mr8061082qbp.1164229779965; Wed, 22 Nov 2006 13:09:39 -0800 (PST) Received: by 10.65.110.19 with HTTP; Wed, 22 Nov 2006 13:09:39 -0800 (PST) Message-ID: Date: Wed, 22 Nov 2006 23:09:39 +0200 From: "Vlad Galu" To: freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: Kqueue write event position? 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, 22 Nov 2006 21:32:18 -0000 On 11/22/06, Ivan Voras wrote: > >From the kqueue(2) manual: > > """ > EVFILT_VNODE Takes a file descriptor as the identifier and the events > to watch for in fflags, and returns when one or more of > the requested events occurs on the descriptor. The > events > to monitor are:... > """ > > I'm interested in NOTE_WRITE, but is there a way to find out where has > the write been performed (position and length)? If not, how difficult > would it be to expand the API so this information is included? > It seems to me you would have to propagate that info along the VOP_WRITE_POST->VFS_KNOTE_LOCKED->VN_KNOTE->knote() chain. Since knote() is generic and is used for all types of notifications, you can probably roll down your own replacement and call it from VN_KNOTE. Of course, there probably is a better way :) > _______________________________________________ > 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" > -- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it. From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 23 01:32:09 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 EE5A616A47C for ; Thu, 23 Nov 2006 01:32:09 +0000 (UTC) (envelope-from zhaotongyi@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 299A943D49 for ; Thu, 23 Nov 2006 01:31:37 +0000 (GMT) (envelope-from zhaotongyi@gmail.com) Received: by nz-out-0102.google.com with SMTP id i11so235710nzh for ; Wed, 22 Nov 2006 17:32:08 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:mime-version:content-type; b=tkC7Nl4bRM0AHtGRPrSQmPbaVeBUmRR+sou3lju3uT/eyOHeDMsAIQe35UoRflUcxm4AQKjP/6xLUTo0d+Jev4dAVxEMexvFCGofoY0Qczu2y/3bbjVIoM4ussy/ZJftNyXu6/8bd2aKCnenTFhxOI8RedANXL9GOT2oVPBt0R8= Received: by 10.64.84.3 with SMTP id h3mr2260778qbb.1164245528030; Wed, 22 Nov 2006 17:32:08 -0800 (PST) Received: by 10.65.243.13 with HTTP; Wed, 22 Nov 2006 17:32:07 -0800 (PST) Message-ID: <380d4510611221732l741ca713u95d5e496d0a0b2a7@mail.gmail.com> Date: Thu, 23 Nov 2006 09:32:07 +0800 From: "Zhao Tongyi" To: freebsd-ppc@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Anyone solved boot freebsd-elf image from u-boot now? 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, 23 Nov 2006 01:32:10 -0000 I found *rafal.jaworowski* have wrote some patch to boot freebsd-elf image through u-boot in freebsd-hackers mail list, I have a ppc-4xx board ,and want to use u-boot as bootloader, Can we boot freebsd through u-boot ? From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 23 06:30:37 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 3732516A417 for ; Thu, 23 Nov 2006 06:30:37 +0000 (UTC) (envelope-from kamalpr@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 36FB143D53 for ; Thu, 23 Nov 2006 06:30:02 +0000 (GMT) (envelope-from kamalpr@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so741548nfc for ; Wed, 22 Nov 2006 22:30:35 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=hzGxgc7p6FLp0LPVPYDEi67gBOqvge8fq9lp/9dawnYu3BxxtjCVblNRL65KgJwpVOJitI5BNcTCAheCgKwfVN05M37wKbotfBt9U6n5r90ZLGJ+INABetE5E4I5dgFq0Nzyyzjz3ayCbEDBFE4iAX0jEVMlpjb4dVgTdMo70fw= Received: by 10.82.142.9 with SMTP id p9mr1370307bud.1164263434736; Wed, 22 Nov 2006 22:30:34 -0800 (PST) Received: by 10.82.171.9 with HTTP; Wed, 22 Nov 2006 22:30:34 -0800 (PST) Message-ID: Date: Thu, 23 Nov 2006 12:00:34 +0530 From: "Kamal R. Prasad" Sender: kamalpr@gmail.com To: "Bharma Ji" In-Reply-To: <67beabb0611221202l2bb9a320o601feff7e7b3aa68@mail.gmail.com> MIME-Version: 1.0 References: <67beabb0611221202l2bb9a320o601feff7e7b3aa68@mail.gmail.com> X-Google-Sender-Auth: 469423d6e5fe77b0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Is there any way to avoid copy between the kernel and userland 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, 23 Nov 2006 06:30:37 -0000 If you create a pseudo- device with an mmap() interface -that should do the job. regards -kamal On 11/23/06, Bharma Ji wrote: > > Hi > I am looking for any FreeBSD facility that will allow a userland process > to > pass data to the kernel without doing a copyin or copyout e.g. using a > shared data structure (queue? ) for example? Any pointers will be useful > Thanks > _______________________________________________ > 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 Thu Nov 23 09:19:45 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 9937716A40F for ; Thu, 23 Nov 2006 09:19:45 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4041243D60 for ; Thu, 23 Nov 2006 09:19:08 +0000 (GMT) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GnAk9-0002MG-5p for freebsd-hackers@freebsd.org; Thu, 23 Nov 2006 10:19:41 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Nov 2006 10:19:41 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Nov 2006 10:19:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Thu, 23 Nov 2006 10:19:29 +0100 Lines: 12 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 1.5.0.4 (X11/20060625) In-Reply-To: Sender: news Subject: Re: Kqueue write event position? 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, 23 Nov 2006 09:19:45 -0000 Vlad Galu wrote: > It seems to me you would have to propagate that info along the > VOP_WRITE_POST->VFS_KNOTE_LOCKED->VN_KNOTE->knote() chain. Since > knote() is generic and is used for all types of notifications, you can > probably roll down your own replacement and call it from VN_KNOTE. Of > course, there probably is a better way :) Before I get any further with this, can anyone predict what would be the impact of monitoring a large number of files (50,000 or more) with kqueue? For kqueue to work, each file would have to be opened (and take up one file descriptor). From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 23 10:22:14 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 A6F9916A403 for ; Thu, 23 Nov 2006 10:22:14 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2ABAD43D73 for ; Thu, 23 Nov 2006 10:21:36 +0000 (GMT) (envelope-from dudu@dudu.ro) Received: by nz-out-0102.google.com with SMTP id i11so277648nzh for ; Thu, 23 Nov 2006 02:22:10 -0800 (PST) Received: by 10.65.219.4 with SMTP id w4mr14245257qbq.1164277329939; Thu, 23 Nov 2006 02:22:09 -0800 (PST) Received: by 10.65.110.19 with HTTP; Thu, 23 Nov 2006 02:22:09 -0800 (PST) Message-ID: Date: Thu, 23 Nov 2006 12:22:09 +0200 From: "Vlad Galu" To: freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: Kqueue write event position? 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, 23 Nov 2006 10:22:14 -0000 On 11/23/06, Ivan Voras wrote: > Vlad Galu wrote: > > > It seems to me you would have to propagate that info along the > > VOP_WRITE_POST->VFS_KNOTE_LOCKED->VN_KNOTE->knote() chain. Since > > knote() is generic and is used for all types of notifications, you can > > probably roll down your own replacement and call it from VN_KNOTE. Of > > course, there probably is a better way :) > > Before I get any further with this, can anyone predict what would be the > impact of monitoring a large number of files (50,000 or more) with > kqueue? For kqueue to work, each file would have to be opened (and take > up one file descriptor). My guess is that it won't be remarcably high. However, you can create those files, add them to your notification list and randomly write bytes to them, to see how your system performs. One more suggestion, I think it would be better if, in case you extend the vnode API, you only send the size of the write in the data field of the kevent structure and you store the offset in your program and adding the size to it everytime an event occurs. > _______________________________________________ > 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" > -- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it. From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 23 10:44:32 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 342CB16A416 for ; Thu, 23 Nov 2006 10:44:32 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57B8943D5A for ; Thu, 23 Nov 2006 10:43:57 +0000 (GMT) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GnC3v-0002zQ-NT for freebsd-hackers@freebsd.org; Thu, 23 Nov 2006 11:44:11 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Nov 2006 11:44:11 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Nov 2006 11:44:11 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Thu, 23 Nov 2006 11:44:01 +0100 Lines: 11 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 1.5.0.4 (X11/20060625) In-Reply-To: Sender: news Subject: Re: Kqueue write event position? 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, 23 Nov 2006 10:44:32 -0000 Vlad Galu wrote: > My guess is that it won't be remarcably high. However, you can > create those files, add them to your notification list and randomly > write bytes to them, to see how your system performs. One more > suggestion, I think it would be better if, in case you extend the > vnode API, you only send the size of the write in the data field of > the kevent structure and you store the offset in your program and > adding the size to it everytime an event occurs. The writes will not be sequential so I need both offset and length. From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 23 10:54:26 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 6F01516A403 for ; Thu, 23 Nov 2006 10:54:26 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id B506A43D7B for ; Thu, 23 Nov 2006 10:53:51 +0000 (GMT) (envelope-from dudu@dudu.ro) Received: by nz-out-0102.google.com with SMTP id i11so281243nzh for ; Thu, 23 Nov 2006 02:54:25 -0800 (PST) Received: by 10.65.224.11 with SMTP id b11mr14310997qbr.1164279265112; Thu, 23 Nov 2006 02:54:25 -0800 (PST) Received: by 10.65.110.19 with HTTP; Thu, 23 Nov 2006 02:54:24 -0800 (PST) Message-ID: Date: Thu, 23 Nov 2006 12:54:24 +0200 From: "Vlad Galu" To: freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: Kqueue write event position? 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, 23 Nov 2006 10:54:26 -0000 On 11/23/06, Ivan Voras wrote: > Vlad Galu wrote: > > > My guess is that it won't be remarcably high. However, you can > > create those files, add them to your notification list and randomly > > write bytes to them, to see how your system performs. One more > > suggestion, I think it would be better if, in case you extend the > > vnode API, you only send the size of the write in the data field of > > the kevent structure and you store the offset in your program and > > adding the size to it everytime an event occurs. > > The writes will not be sequential so I need both offset and length. > Eh I guess you can use udata for one of them, then. > _______________________________________________ > 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" > -- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it. From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 23 12:19:27 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 3A2AC16A4D4 for ; Thu, 23 Nov 2006 12:19:27 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0DDD43E1A for ; Thu, 23 Nov 2006 12:17:30 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 909B846D7A; Thu, 23 Nov 2006 07:18:03 -0500 (EST) Date: Thu, 23 Nov 2006 12:18:03 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ivan Voras In-Reply-To: Message-ID: <20061123121513.U50054@fledge.watson.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Kqueue write event position? 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, 23 Nov 2006 12:19:27 -0000 On Wed, 22 Nov 2006, Ivan Voras wrote: >> From the kqueue(2) manual: > > """ > EVFILT_VNODE Takes a file descriptor as the identifier and the events > to watch for in fflags, and returns when one or more of > the requested events occurs on the descriptor. The > events > to monitor are:... > """ > > I'm interested in NOTE_WRITE, but is there a way to find out where has the > write been performed (position and length)? If not, how difficult would it > be to expand the API so this information is included? My concern with this idea is that kqueues are not really intended to provide an event stream, rather, notification of a condition. As writes often come in batches, it's likely that by the time the kevent is received, several writes will have occurred, but only a single event notification will be present. Is the application you have in mind able to benefit from what is effectively "polled" sampling of writes? Does it benefit in the presence of writes from concurrent writers, where things like the position and length may depend on which of two or more writers wrote to the file most or least recently? Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 23 12:34:38 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org 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 A186D16A47B; Thu, 23 Nov 2006 12:34:38 +0000 (UTC) (envelope-from ivoras@fer.hr) Received: from lara.cc.fer.hr (lara.cc.fer.hr [161.53.72.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5881943EBF; Thu, 23 Nov 2006 12:29:03 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from [127.0.0.1] (localhost.cc.fer.hr [127.0.0.1]) by lara.cc.fer.hr (8.13.8/8.13.8) with ESMTP id kANCTYUD003041; Thu, 23 Nov 2006 13:29:34 +0100 (CET) (envelope-from ivoras@fer.hr) Message-ID: <4565942E.6030004@fer.hr> Date: Thu, 23 Nov 2006 13:29:34 +0100 From: Ivan Voras User-Agent: Thunderbird 1.5.0.4 (X11/20060625) MIME-Version: 1.0 To: Robert Watson References: <20061123121513.U50054@fledge.watson.org> In-Reply-To: <20061123121513.U50054@fledge.watson.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: Kqueue write event position? 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, 23 Nov 2006 12:34:38 -0000 Robert Watson wrote: > My concern with this idea is that kqueues are not really intended to > provide an event stream, rather, notification of a condition. As writes > often come in batches, it's likely that by the time the kevent is > received, several writes will have occurred, but only a single event > notification will be present. Is the application you have in mind able > to benefit from what is effectively "polled" sampling of writes? Does > it benefit in the presence of writes from concurrent writers, where > things like the position and length may depend on which of two or more > writers wrote to the file most or least recently? Yes, this was the next question I wanted to ask. I was counting on receiving just the stream of events you describe - receiving random samples of it would be as useful as only receiving write notifications. Thanks for clarifying this! From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 23 16:24:28 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 349BB16A40F; Thu, 23 Nov 2006 16:24:28 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04D3043D53; Thu, 23 Nov 2006 16:23:51 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1GnHNC-000C65-4j; Thu, 23 Nov 2006 18:24:26 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: freebsd-scsi@freebsd.org, freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 23 Nov 2006 18:24:25 +0200 From: Danny Braniss Message-ID: Cc: Subject: iSCSI/shutdown advice needed 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, 23 Nov 2006 16:24:28 -0000 hi, I'm trying to finish up the iSCSI initiator, and need some advice. To shutdown the initiator, I need to: 1- close down the CAM-peripherals, (ie da) 2- empty up all pending iSCSI transactions 3- close the tcp connection 2 & 3 I can handle, it's 1 that im stuck. Q: how can I call the peripheral close function, or is there some CAM command? I tried xpt_async(AC_LOST_DEVICE, isp->cam_path, NULL); but this it far to drastic, and actually will cause panic if the device is still mounted. danny From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 24 07:34:27 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 C2E1A16A412 for ; Fri, 24 Nov 2006 07:34:27 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from mail.r61.net (mail.r61.net [195.208.245.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id D46F243D53 for ; Fri, 24 Nov 2006 07:33:40 +0000 (GMT) (envelope-from bushman@freebsd.org) Received: from stinger.cc.rsu.ru (stinger.cc.rsu.ru [195.208.252.82]) (authenticated bits=0) by mail.r61.net (8.13.8/8.13.8) with ESMTP id kAO7YFPQ004811 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 24 Nov 2006 10:34:15 +0300 (MSK) (envelope-from bushman@freebsd.org) From: Michael Bushkov Organization: Rostov State University To: freebsd-hackers@freebsd.org Date: Fri, 24 Nov 2006 10:34:16 +0300 User-Agent: KMail/1.9.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_5BqZFsUDZir4w3g" Message-Id: <200611241034.17514.bushman@freebsd.org> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on asterix.r61.net X-Virus-Status: Clean Subject: [PATCH] make_libdeps.sh in -CURRENT 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, 24 Nov 2006 07:34:27 -0000 --Boundary-00=_5BqZFsUDZir4w3g Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, As far as I understand the src/tools/make_libdeps.sh logic, its current version handles any library that uses bsd.own.mk header incorrectly, because the "make -V LDADD" command always fails with "undefined MK_XXX variable". Small patch, that is attached to this letter, fixes the problem. -- With best regards, Michael Bushkov Rostov State University --Boundary-00=_5BqZFsUDZir4w3g Content-Type: text/x-diff; charset="us-ascii"; name="make_libdeps.sh.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="make_libdeps.sh.diff" --- make_libdeps.sh.orig Fri Nov 24 10:11:07 2006 +++ make_libdeps.sh Fri Nov 24 10:08:13 2006 @@ -65,7 +65,7 @@ libdir=$(dirname ${makefile}) deps=$( cd ${libdir} - make -V LDADD + make -m ${USRSRC}/share/mk -V LDADD ) if [ "${deps}" ]; then echo ${libdir}"${FS}"$( --Boundary-00=_5BqZFsUDZir4w3g-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 24 09:09:19 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 98E5016A40F; Fri, 24 Nov 2006 09:09:19 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA2D643D69; Fri, 24 Nov 2006 09:08:34 +0000 (GMT) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id 2FAC3EB11F8; Fri, 24 Nov 2006 17:09:14 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id t0e42h0gkK1z; Fri, 24 Nov 2006 17:09:07 +0800 (CST) Received: from [10.217.12.203] (sina152-194.staff.sina.com.cn [61.135.152.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id A0D69EB119E; Fri, 24 Nov 2006 17:09:05 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:organization:user-agent:mime-version:to:cc: subject:references:in-reply-to:x-enigmail-version:content-type; b=R2ZEdu27dqzLL1kN3g4iNm57TgCP5WqVlGotFHJJ5K4OU+vGpJeZ6A84fHVjfumSL C86ovTiI5KlbHK/eq9Rpg== Message-ID: <4566B69C.3010907@delphij.net> Date: Fri, 24 Nov 2006 17:08:44 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 1.5.0.8 (Macintosh/20061025) MIME-Version: 1.0 To: Michael Bushkov References: <200611241034.17514.bushman@freebsd.org> In-Reply-To: <200611241034.17514.bushman@freebsd.org> X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig134E9A1F7772CB0E0FD6DDB2" Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] make_libdeps.sh in -CURRENT 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, 24 Nov 2006 09:09:19 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig134E9A1F7772CB0E0FD6DDB2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Michael Bushkov wrote: > Hello, > As far as I understand the src/tools/make_libdeps.sh logic, its current= =20 > version handles any library that uses bsd.own.mk header incorrectly, be= cause=20 > the "make -V LDADD" command always fails with "undefined MK_XXX variabl= e". >=20 > Small patch, that is attached to this letter, fixes the problem. Yes, I think it makes sense to make use of the mk/ files that is provided in the source tree here, I have just checked the change against -HEAD. Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------enig134E9A1F7772CB0E0FD6DDB2 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.5 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFZracOfuToMruuMARA6/6AJ4x36NDBm566sup7KhIWkDCu9SECACePTF8 IBJKzggYVIpg8lHI+sTwRUU= =8Tbr -----END PGP SIGNATURE----- --------------enig134E9A1F7772CB0E0FD6DDB2-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 24 18:32:49 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 7FEA816A403 for ; Fri, 24 Nov 2006 18:32:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6979143D67 for ; Fri, 24 Nov 2006 18:32:02 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kAOIVoRw041217; Fri, 24 Nov 2006 11:31:50 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 24 Nov 2006 11:32:34 -0700 (MST) Message-Id: <20061124.113234.-2101771679.imp@bsdimp.com> To: aag.lists@gmail.com From: "M. Warner Losh" In-Reply-To: <2f3a439f0611142305n441d3adwf7738ae40f9103e3@mail.gmail.com> References: <2f3a439f0611142305n441d3adwf7738ae40f9103e3@mail.gmail.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 24 Nov 2006 11:31:50 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Ramdisk 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: Fri, 24 Nov 2006 18:32:49 -0000 In message: <2f3a439f0611142305n441d3adwf7738ae40f9103e3@mail.gmail.com> "Aditya Godbole" writes: : Is there any ramdisk support in freebsd, as there is in netbsd? If : there is no such functionality right now, is anyone working on it? : What are the alternatives if I want to mount a root filesytem from ram? mdconfig will create one at run time. If you want to compile it into the kernel, then you need to create your image (mine is for an ARM, and I call my image ARM-MD). You then need the following config options: options MD_ROOT #MD is a potential root device options MD_ROOT_SIZE=8192 # 8MB ram disk makeoptions MFS_IMAGE=/home/imp/ARM-MD options ROOTDEVNAME=\"ufs:md0\" in your kernel. This is for -current. I'm unsure if the MFS_IMAGE stuff has been MFC'd or not. If not, then you'll need to perform the following steps after you build the kernel to add the image: @dd if="${MFS_IMAGE}" ibs=8192 of="${KERNEL_KO}" \ obs=`strings -at d "${KERNEL_KO}" | \ grep "MFS Filesystem goes here" | awk '{print $$1}'` \ oseek=1 conv=notrunc 2>/dev/null && \ strings ${KERNEL_KO} | \ grep 'MFS Filesystem had better STOP here' > /dev/null || \ (rm ${KERNEL_KO} && echo 'MFS image too large' && false) where KERNEL_KO is typically 'kernel'. Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 24 18:38:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 1C31516A40F for ; Fri, 24 Nov 2006 18:38:46 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C18C43D49 for ; Fri, 24 Nov 2006 18:38:02 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kAOIaDIp041279; Fri, 24 Nov 2006 11:36:13 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 24 Nov 2006 11:36:57 -0700 (MST) Message-Id: <20061124.113657.1723938840.imp@bsdimp.com> To: freebsd-hackers@freebsd.org, aag.lists@gmail.com, olli@lurza.secnetix.de From: "M. Warner Losh" In-Reply-To: <200611161457.kAGEvp3F068251@lurza.secnetix.de> References: <2f3a439f0611160556o6e643561sf45bccab2ad769ad@mail.gmail.com> <200611161457.kAGEvp3F068251@lurza.secnetix.de> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 24 Nov 2006 11:36:13 -0700 (MST) Cc: Subject: Re: Ramdisk 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: Fri, 24 Nov 2006 18:38:46 -0000 In message: <200611161457.kAGEvp3F068251@lurza.secnetix.de> Oliver Fromme writes: : Aditya Godbole wrote: : > Oliver Fromme wrote: : > > I don't know u-boot. What is that? : > : > u-boot is a bootloader popular in embedded systems. : > Its often used with Linux. : : I see. Is it PXE-compliant? If so, you can use FreeBSD's : PXE bootloader (/boot/pxeboot) for loading the kernel. In : that case you can also load the root FS image as a separate : file, so there is no need to hack it into the kernel binary. : : As far as I know, there is no official support for loading : a FreeBSD kernel directly, without using the FreeBSD boot : loader. : : By the way, why don't you simply mount the root FS via NFS? : Is the NIC not supported? What NIC is it? This sounds like it might be a port to a new platform. I ran into exactly this issue when porting FreeBSD/arm to the AT91Rm9200. I needed a ram disk to run out of because at the time I barely had serial console support working, let alone network. The boot loader I had groked these things. And pxe was nowhere to be found. In time, I wrote a network driver, then an SD driver and someone else wrote a the usb glue so I had a lot of choices, but in the early days, all I could use was a ram disk... Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 24 23:47:42 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 F0D5716A417 for ; Fri, 24 Nov 2006 23:47:42 +0000 (UTC) (envelope-from m.jakeman@lancaster.ac.uk) Received: from errol.lancs.ac.uk (errol.lancs.ac.uk [148.88.0.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D0A243D76 for ; Fri, 24 Nov 2006 23:46:41 +0000 (GMT) (envelope-from m.jakeman@lancaster.ac.uk) Received: from mail01.lancs.ac.uk ([148.88.1.53] helo=marl.lancs.ac.uk) by errol.lancs.ac.uk with esmtp (Exim 4.60) (envelope-from ) id 1GnklP-0007Pc-SF for freebsd-hackers@freebsd.org; Fri, 24 Nov 2006 23:47:23 +0000 Received: from ina044000004.lancs.ac.uk ([148.88.224.46]) by marl.lancs.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1GnklL-0004Yl-3u; Fri, 24 Nov 2006 23:47:19 +0000 From: m.jakeman@lancaster.ac.uk Organization: Lancaster University To: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org Date: Fri, 24 Nov 2006 23:36:14 +0000 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611242336.14998.m.jakeman@lancaster.ac.uk> Cc: Subject: ifnet struct interface type X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: m.jakeman@lancaster.ac.uk List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Nov 2006 23:47:43 -0000 Hi, I am writing some code that is using the systems ifnet structs via ifnet_byindex(), I have two network interfaces : broadcom BCM6750A1M using the 'bge' driver Intel PRO/wireless 2915ABG using the 'iwi' driver I have written some code to output the ifnet->if_type for each interface and it shows that both have type 6 (IFT_ETHER). My question is why do they both have this type when there are IFT_GIGABITETHERNET and IFT_IEEE80211? I was planning on using this value to distinguish what sort of connection each interface is using but obviously with both returning IFT_ETHER this is not possible, any help is much appreciated! Cheers Matt From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 24 23:57:32 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 893CC16A40F for ; Fri, 24 Nov 2006 23:57:32 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BA7443D7E for ; Fri, 24 Nov 2006 23:56:36 +0000 (GMT) (envelope-from josh.carroll@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so1312578nfc for ; Fri, 24 Nov 2006 15:57:20 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=fHTD5VmS+N6M+i5g0s5WSZVeaviAW1j4yEoulO521CrFQZ54nU8GClMkfpoJWyKJkhK0D5OHPL3AQ5lnfAs3iQDfTylAXY6GHUYi+dtkbk3jGrQxPEOl9dx5VIYFeJyCbfZ0WT84UEh8Z2a8f1R8Q3WDYfKqHBIqH0Mur8KmHMI= Received: by 10.82.126.5 with SMTP id y5mr1660435buc.1164412639694; Fri, 24 Nov 2006 15:57:19 -0800 (PST) Received: by 10.82.163.16 with HTTP; Fri, 24 Nov 2006 15:57:19 -0800 (PST) Message-ID: <8cb6106e0611241557h6b40c6f1laad08ffac29bbb6a@mail.gmail.com> Date: Fri, 24 Nov 2006 15:57:19 -0800 From: "Josh Carroll" Sender: josh.carroll@gmail.com To: m.jakeman@lancaster.ac.uk In-Reply-To: <200611242336.14998.m.jakeman@lancaster.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200611242336.14998.m.jakeman@lancaster.ac.uk> X-Google-Sender-Auth: 441b3f9ec2eddc50 Cc: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: ifnet struct interface type 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, 24 Nov 2006 23:57:32 -0000 > I was planning on using this value to > distinguish what sort of connection each interface is using but obviously > with both returning IFT_ETHER this is not possible, any help is much > appreciated! It would probably be better to query the interface's media setting instead, since you may have a gigabit card that autonegotiated to 100baseTx-FD or similar. You could probably take a look at /usr/src/sbin/ifconfig/ifmedia.c for details on how to query what the card's current media setting is. Regards, Josh From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 25 05:07:03 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 169CF16A407 for ; Sat, 25 Nov 2006 05:07:03 +0000 (UTC) (envelope-from aag.lists@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0875F43D45 for ; Sat, 25 Nov 2006 05:06:16 +0000 (GMT) (envelope-from aag.lists@gmail.com) Received: by py-out-1112.google.com with SMTP id f31so623733pyh for ; Fri, 24 Nov 2006 21:07:01 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YhZQhE3LrzgYoIJ6HLTET7jpaJKWnv+W7QElLHoVkCcoZSgS5rP94b74hfLR2e3Gc3xfgFjgtIGjEsssJL5TBscNP04ft+148qHdrOxL9xF4uscrccRzOpTcrky92qDDC4j8hukAo4q7HAC5SmoIuiQQISIiYVuuzh4y1/yfSeg= Received: by 10.35.107.20 with SMTP id j20mr7482124pym.1164431221639; Fri, 24 Nov 2006 21:07:01 -0800 (PST) Received: by 10.35.58.4 with HTTP; Fri, 24 Nov 2006 21:07:01 -0800 (PST) Message-ID: <2f3a439f0611242107v1fc29db0m35f2c0d3495b4db5@mail.gmail.com> Date: Sat, 25 Nov 2006 10:37:01 +0530 From: "Aditya Godbole" To: "M. Warner Losh" In-Reply-To: <20061124.113508.1585999887.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2f3a439f0611160038g5349f25bn8a1970120bc52b0@mail.gmail.com> <200611161335.kAGDZKH4063973@lurza.secnetix.de> <2f3a439f0611160556o6e643561sf45bccab2ad769ad@mail.gmail.com> <20061124.113508.1585999887.imp@bsdimp.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Ramdisk 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: Sat, 25 Nov 2006 05:07:03 -0000 On 11/25/06, M. Warner Losh wrote: > Sounds like you have an interesting FreeBSD port going on here. Sorry > I answered 9 days after you asked your question, I'm behind on > -hackers. > > What are you porting FreeBSD to? > I'm porting it to the MPC8555CDS which has a e500 ppc core. The tragedy however, is that I'm porting FreeBSD 4.10! There are a few other who are porting FreeBSD 6.x to the same platform. freebsd-ppc has more discussions on this. -- aditya