From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 26 06:27:02 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF38D1065676 for ; Sun, 26 Oct 2008 06:27:02 +0000 (UTC) (envelope-from novel@FreeBSD.org) Received: from viefep18-int.chello.at (viefep18-int.chello.at [213.46.255.22]) by mx1.freebsd.org (Postfix) with ESMTP id 05D908FC08 for ; Sun, 26 Oct 2008 06:27:01 +0000 (UTC) (envelope-from novel@FreeBSD.org) Received: from underworld.novel.ru ([88.147.175.232]) by viefep24-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20081026060935.RTXA19980.viefep24-int.chello.at@underworld.novel.ru> for ; Sun, 26 Oct 2008 07:09:35 +0100 Date: Sun, 26 Oct 2008 09:09:07 +0300 From: Roman Bogorodskiy To: freebsd-hackers@freebsd.org Message-ID: <20081026060906.GA66894@underworld.novel.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-PGP: http://people.freebsd.org/~novel/novel.key.asc Subject: problems obtaining kernel dump 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, 26 Oct 2008 06:27:02 -0000 Hello, I'm having a problem obtaining kernel dump. The box has 512Mb of RAM. In rc.conf I have: dumpdev="/dev/ad4s1b" dumpdir="/var/crash" swapinfo -h gives the following: Device 1K-blocks Used Avail Capacity /dev/ad4s1b 1048576 0B 1.0G 0% /var/crash directory exists, and the root partition where it is placed has enough space as well: /dev/ad4s1a 989M 350M 560M 38% / The box runs fresh FreeBSD/i386 -CURRENT. So, I do swapoff and then perform actions to reproduce the crash and it breaks me into ddb prompt. I do: call doadump continue it reboots, and when I run "savecore -v /var/crash /dev/ad4s1b" it prints: unable to open bounds file, using 0 checking for kernel dump on device /dev/ad4s1b mediasize = 1073741824 sectorsize = 512 magic mismatch on last dump header on /dev/ad4s1b savecore: no dumps found The same happens when I do 'panic' instead of 'call doadump' like handbook suggests. What am I doing wrong? I googled for similar problems, found some mail threads but didn't find meaningful advises though. Roman Bogorodskiy From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 26 10:49:08 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B72A51065670; Sun, 26 Oct 2008 10:49:08 +0000 (UTC) (envelope-from martin.laabs@mailbox.tu-dresden.de) Received: from mailout2.zih.tu-dresden.de (mailout2.zih.tu-dresden.de [141.30.67.73]) by mx1.freebsd.org (Postfix) with ESMTP id 754E98FC1B; Sun, 26 Oct 2008 10:49:08 +0000 (UTC) (envelope-from martin.laabs@mailbox.tu-dresden.de) Received: from rmc67-31.zih.tu-dresden.de ([141.30.67.31] helo=server-n) by mailout2.zih.tu-dresden.de with esmtp (Exim 4.63) (envelope-from ) id 1Ku3BA-0006fK-5o; Sun, 26 Oct 2008 11:49:06 +0100 Received: from localhost (p5B0EDE65.dip.t-dialin.net [91.14.222.101]) by server-n (Postfix) with ESMTP id EB22B100A08E; Sun, 26 Oct 2008 11:49:02 +0100 (CET) Date: Sun, 26 Oct 2008 11:49:02 +0100 To: "freebsd-hackers@freebsd.org" From: "Martin Laabs" Content-Type: text/plain; charset=iso-8859-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: User-Agent: Opera Mail/9.51 (Linux) X-TUD-Virus-Scanned: mailout2.zih.tu-dresden.de Cc: "freebsd-emulation@freebsd.org" Subject: linux-libusb done 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, 26 Oct 2008 10:49:08 -0000 Hi, I've build succesfully an androgynous libusb. This is a libusb in linux binary format with freebsd-like usb-access. (I use it to run a jtag-debugging utility which is supplied as a linux binary only.) Unfortunately I had to patch the linux.ko module to support the ioctl calls out of the linux application. I can supply the libusb.so, a patch for the source of libusb as well as the linux_ioctl.c on request. Unfotunately I did not save the original linux_ioctl.c so I can not publish a patch yet. (I'll do a cvsup these days ..) Anyone who wants to maintain such a port? Greetings, Martin From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 26 10:54:02 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 410BC1065684; Sun, 26 Oct 2008 10:54:02 +0000 (UTC) (envelope-from rdivacky@lev.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id EFDA58FC12; Sun, 26 Oct 2008 10:54:01 +0000 (UTC) (envelope-from rdivacky@lev.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id AE9039CB138; Sun, 26 Oct 2008 11:53:04 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X7ftbIXMgtio; Sun, 26 Oct 2008 11:52:52 +0100 (CET) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id C8C159CB5DF; Sun, 26 Oct 2008 11:52:52 +0100 (CET) Received: (from rdivacky@localhost) by lev.vlakno.cz (8.14.2/8.14.2/Submit) id m9QAqqMR045922; Sun, 26 Oct 2008 11:52:52 +0100 (CET) (envelope-from rdivacky) Date: Sun, 26 Oct 2008 11:52:52 +0100 From: Roman Divacky To: Martin Laabs Message-ID: <20081026105252.GA45809@freebsd.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: "freebsd-hackers@freebsd.org" , "freebsd-emulation@freebsd.org" Subject: Re: linux-libusb done 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, 26 Oct 2008 10:54:02 -0000 On Sun, Oct 26, 2008 at 11:49:02AM +0100, Martin Laabs wrote: > Hi, > > I've build succesfully an androgynous libusb. This is a libusb in > linux binary format with freebsd-like usb-access. (I use it to > run a jtag-debugging utility which is supplied as a linux > binary only.) > Unfortunately I had to patch the linux.ko module to support the > ioctl calls out of the linux application. > I can supply the libusb.so, a patch for the source of libusb > as well as the linux_ioctl.c on request. > Unfotunately I did not save the original linux_ioctl.c so I can not > publish a patch yet. (I'll do a cvsup these days ..) > > Anyone who wants to maintain such a port? great work martin! please show us the linuxulator patch and I'll see what I can do about it... roman From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 26 15:27:10 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E24901065682 for ; Sun, 26 Oct 2008 15:27:10 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id B5A238FC14 for ; Sun, 26 Oct 2008 15:27:09 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 8552F1CCA0; Sun, 26 Oct 2008 16:27:07 +0100 (CET) Date: Sun, 26 Oct 2008 16:27:07 +0100 From: Ed Schouten To: FreeBSD Hackers Message-ID: <20081026152707.GJ6808@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aznLbwQ42o7LEaqN" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Subject: [Testers wanted] /dev/console cleanups 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, 26 Oct 2008 15:27:11 -0000 --aznLbwQ42o7LEaqN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello everyone, Most of you probably already know that I've been very busy improving our kernel's TTY implementation. I've committed the new MPSAFE TTY layer back in August. So far most of the things seem to work properly as far as I can see. There are always some small bugs, but I'm confident we'll get them fixed before 8.0. One of the things that I dislike about the code we have right now, is the way /dev/console is implemented. There is a small amount of complexity there, which is mainly because of the fact that our console code actually works on two different levels: - We've got kernel messages that are printed using very low-level routines and communicate directly with the drivers. - We've got user messages that are printed through /dev/console, which actually work on the TTY level, but make use of a similar device selection as the first set of routines. In an attempt to make /dev/console MPSAFE, I moved /dev/console into the TTY layer itself, which makes it a lot more simple than it is now. Well, to keep a long story short, it would be wonderful if some people could test the latest MPSAFE TTY patchset, just to make sure it doesn't wreck people's setups after I commit this. So just apply the patch and see if you can still boot your system, go into single user and multi user mode, use conscontrol(8), etc. I've stored the latest MPSAFE TTY patchsets at the usual location. Make sure you download the latest version. http://people.FreeBSD.org/~ed/mpsafetty/ The patchset also includes some other nice things, like some manual pages (not finished) and a port of snp(4) to the new TTY layer (also not finished). Thank you for your attention! --=20 Ed Schouten WWW: http://80386.nl/ --aznLbwQ42o7LEaqN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkEjEsACgkQ52SDGA2eCwWW0ACeJ0sE0tqrUgPmpEM6wSy7NSvG JrsAniKi6KlX9HGo9yH4G+j/w68/7UDO =AfmZ -----END PGP SIGNATURE----- --aznLbwQ42o7LEaqN-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 27 14:11:13 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CE191065674; Mon, 27 Oct 2008 14:11:13 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id C1AC18FC08; Mon, 27 Oct 2008 14:11:12 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id m9REB7lw015189; Mon, 27 Oct 2008 15:11:08 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id m9REB6te015188; Mon, 27 Oct 2008 15:11:06 +0100 (CET) (envelope-from olli) Date: Mon, 27 Oct 2008 15:11:06 +0100 (CET) Message-Id: <200810271411.m9REB6te015188@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, doconnor@gsoft.com.au, Alexander Sack , freebsd-questions@FreeBSD.ORG, Wojciech Puchar In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 27 Oct 2008 15:11:11 +0100 (CET) Cc: Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit ?binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, doconnor@gsoft.com.au, Alexander Sack , freebsd-questions@FreeBSD.ORG, Wojciech Puchar List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 14:11:13 -0000 Daniel O'Connor wrote: > On Friday 24 October 2008 23:20:59 Peter Jeremy wrote: > > > this will make system trying to bind 32-bit libs to 64-bit program. it > > > can't work > > > > rtld shouldn't attempt to bind 32-bit libs to 64-bit programs. > > The same problem happens with the Linux run time linker - it merrily tries to > link FreeBSD libraries to Linux binaries with predictable results.. You *can* link Linux libraries with FreeBSD binaries (and vice versa), if the library does not perform any syscalls, e.g. it is a pure computation library or similar. > That said it would be really nice if it ignored incompatible libraries :) No. Please don't put such pseudo-cleverness into rtld. It wouldn't be an improvement, in fact it might break some working configurations. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "That's what I love about GUIs: They make simple tasks easier, and complex tasks impossible." -- John William Chambless From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 27 14:20:11 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD5EE1065670 for ; Mon, 27 Oct 2008 14:20:11 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4C3F18FC1D for ; Mon, 27 Oct 2008 14:20:11 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id m9REK9sL015612; Mon, 27 Oct 2008 15:20:09 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id m9REK9iF015611; Mon, 27 Oct 2008 15:20:09 +0100 (CET) (envelope-from olli) Date: Mon, 27 Oct 2008 15:20:09 +0100 (CET) Message-Id: <200810271420.m9REK9iF015611@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, martin.laabs@mailbox.tu-dresden.de In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 27 Oct 2008 15:20:10 +0100 (CET) Cc: Subject: Re: libusb for linux-emulation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, martin.laabs@mailbox.tu-dresden.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 14:20:11 -0000 Martin Laabs wrote: > Hans Petter Selasky wrote: > > No, you cannot use the linux libusb on FreeBSD. You need to use the FreeBSD > > compiled libusb. The USB kernel interfaces are quite different. > > OK - I see. I'm just trying to build a "hermaphrodite" library. Compile with > linux but using the BSD ioctls. > Is there a crosscompiler to compile linux binarys from freebsd? This would > make the job much easier. Yes, I think you can use ports/devel/cross-gcc. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Documentation is like sex; when it's good, it's very, very good, and when it's bad, it's better than nothing." -- Dick Brandon From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 27 15:01:44 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8892106566B for ; Mon, 27 Oct 2008 15:01:44 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 743F98FC1B for ; Mon, 27 Oct 2008 15:01:44 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m9RF0UgZ083276; Mon, 27 Oct 2008 09:00:30 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 27 Oct 2008 09:01:39 -0600 (MDT) Message-Id: <20081027.090139.-1699739227.imp@bsdimp.com> To: freebsd-hackers@freebsd.org, martin.laabs@mailbox.tu-dresden.de, olli@lurza.secnetix.de From: "M. Warner Losh" In-Reply-To: <200810271420.m9REK9iF015611@lurza.secnetix.de> References: <200810271420.m9REK9iF015611@lurza.secnetix.de> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: libusb for linux-emulation 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, 27 Oct 2008 15:01:44 -0000 In message: <200810271420.m9REK9iF015611@lurza.secnetix.de> Oliver Fromme writes: : Martin Laabs wrote: : > Hans Petter Selasky wrote: : > > No, you cannot use the linux libusb on FreeBSD. You need to use the FreeBSD : > > compiled libusb. The USB kernel interfaces are quite different. : > : > OK - I see. I'm just trying to build a "hermaphrodite" library. Compile with : > linux but using the BSD ioctls. : > Is there a crosscompiler to compile linux binarys from freebsd? This would : > make the job much easier. : : Yes, I think you can use ports/devel/cross-gcc. I've definitely got to get my cross tools changes into head. Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 27 15:01:55 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDD711065684; Mon, 27 Oct 2008 15:01:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 874678FC19; Mon, 27 Oct 2008 15:01:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m9RF07lK083248; Mon, 27 Oct 2008 09:00:07 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 27 Oct 2008 09:01:16 -0600 (MDT) Message-Id: <20081027.090116.-1827344390.imp@bsdimp.com> To: freebsd-hackers@freebsd.org, doconnor@gsoft.com.au, pisymbol@gmail.com, freebsd-questions@freebsd.org, wojtek@wojtek.tensor.gdynia.pl, olli@lurza.secnetix.de From: "M. Warner Losh" In-Reply-To: <200810271411.m9REB6te015188@lurza.secnetix.de> References: <200810271411.m9REB6te015188@lurza.secnetix.de> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit ?binaries? 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, 27 Oct 2008 15:01:55 -0000 In message: <200810271411.m9REB6te015188@lurza.secnetix.de> Oliver Fromme writes: : Daniel O'Connor wrote: : > On Friday 24 October 2008 23:20:59 Peter Jeremy wrote: : > > > this will make system trying to bind 32-bit libs to 64-bit program. it : > > > can't work : > > : > > rtld shouldn't attempt to bind 32-bit libs to 64-bit programs. : > : > The same problem happens with the Linux run time linker - it merrily tries to : > link FreeBSD libraries to Linux binaries with predictable results.. : : You *can* link Linux libraries with FreeBSD binaries (and : vice versa), if the library does not perform any syscalls, : e.g. it is a pure computation library or similar. : : > That said it would be really nice if it ignored incompatible libraries :) : : No. Please don't put such pseudo-cleverness into rtld. : It wouldn't be an improvement, in fact it might break some : working configurations. Yes. I have a bunch of printer drivers that I've used that link in linux shared libraries... They are in ports... Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 27 22:22:37 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89F831065670 for ; Mon, 27 Oct 2008 22:22:37 +0000 (UTC) (envelope-from mboxindia@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.freebsd.org (Postfix) with ESMTP id 1C8CD8FC1F for ; Mon, 27 Oct 2008 22:22:36 +0000 (UTC) (envelope-from mboxindia@gmail.com) Received: by ug-out-1314.google.com with SMTP id 30so76091ugs.39 for ; Mon, 27 Oct 2008 15:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=daKc0TtZ5LQAbpHnL4rmAQGIYnff0t5IEq+ub/klXtU=; b=o0vwCqZ+1sigKgO1ehrpfwylNh6FOm0gNtwHcv8zMesj/LXjwnNsWvt70+1vYopM4w dQkGojI1jCJoyMI6bsNcAoxPXBE87O/mcfjS6J0QvUfIuHeLvxbWuB/f2Y5lo3FHu/ZO WWEoh67UBakfibvOURMsDRUi7gxOhCnLAXRcY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=VXcc/FU0fURrPXdqZbw8f4KFCpxbrkf+pTXVJxeRefgTEcQ6mZrwgU5bMMB9wYHwFi llWeULV1Lseam7GQwZ7QuzUf1pabbSv/4A+22aeu1JZsuveAeuB7Mey+17f7dU3b++kr pIkQnVcnT6nEBEWS/22OqR+mPp3mGzvqc1oLs= Received: by 10.103.206.12 with SMTP id i12mr3029919muq.33.1225146155410; Mon, 27 Oct 2008 15:22:35 -0700 (PDT) Received: by 10.103.141.5 with HTTP; Mon, 27 Oct 2008 15:22:35 -0700 (PDT) Message-ID: Date: Tue, 28 Oct 2008 03:52:35 +0530 From: Srinivas To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Usage of "files" for config 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, 27 Oct 2008 22:22:37 -0000 Hello, I am a beginner of freebsd kernel. I have some doubts regarding the Makefile generation using "files" by config. Could you plz answer the following doubts: I would like to know the usage of files and files.[arch] in sys/conf. Basically, I didnt get the advantage of having a common file for compilation(like files) rather than an individual Makefile in each subdirectory. I have read makefile(of mkmakefile.c in config). What is the usage of "standard", "optional" and "mandatory" and why it is followed by device. What are .m files? What are they used for? Why are some of the rules in the generated makefile *.ln like scsi_all.ln? What is ${NORMAL_LINT} and ${NORMAL_C} in the generated makefile mean? Thanks, Srinivas From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 27 23:59:44 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9B88106569F; Mon, 27 Oct 2008 23:59:44 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 1DF768FC1D; Mon, 27 Oct 2008 23:59:43 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (Inchoate.gsoft.com.au [203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id m9RNmKoR089330 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 28 Oct 2008 10:18:21 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: "M. Warner Losh" Date: Tue, 28 Oct 2008 10:18:10 +1030 User-Agent: KMail/1.9.10 References: <200810271411.m9REB6te015188@lurza.secnetix.de> <20081027.090116.-1827344390.imp@bsdimp.com> In-Reply-To: <20081027.090116.-1827344390.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6193595.7Yc4fJACZC"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200810281018.18786.doconnor@gsoft.com.au> X-Spam-Score: -3.977 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: pisymbol@gmail.com, freebsd-hackers@freebsd.org, olli@lurza.secnetix.de, freebsd-questions@freebsd.org, wojtek@wojtek.tensor.gdynia.pl Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit ?binaries? 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, 27 Oct 2008 23:59:44 -0000 --nextPart6193595.7Yc4fJACZC Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 28 October 2008 01:31:16 M. Warner Losh wrote: > In message: <200810271411.m9REB6te015188@lurza.secnetix.de> > > Oliver Fromme writes: > : Daniel O'Connor wrote: > : > On Friday 24 October 2008 23:20:59 Peter Jeremy wrote: > : > > > this will make system trying to bind 32-bit libs to 64-bit > : > > > program. it can't work > : > > > : > > rtld shouldn't attempt to bind 32-bit libs to 64-bit programs. > : > > : > The same problem happens with the Linux run time linker - it merrily > : > tries to link FreeBSD libraries to Linux binaries with predictable > : > results.. > : > : You *can* link Linux libraries with FreeBSD binaries (and > : vice versa), if the library does not perform any syscalls, > : e.g. it is a pure computation library or similar. > : > : > That said it would be really nice if it ignored incompatible librari= es > : > :) > : > : No. Please don't put such pseudo-cleverness into rtld. > : It wouldn't be an improvement, in fact it might break some > : working configurations. > > Yes. I have a bunch of printer drivers that I've used that link in > linux shared libraries... They are in ports... Good point.. The problem is really the Linux linker - it will find a FreeBSD library and= =20 try and use it ahead of a Linux one later in the search path - this prevent= s=20 stuff working :) I have this exact problem with libfontconfig and Xilinx ISE. Perhaps instead of ignore, use last.. But then it doesn't really matter for= =20 the FreeBSD linker - I imagine I would have to convince Linux folks it's a= =20 good idea. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart6193595.7Yc4fJACZC Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBJBlNC5ZPcIHs/zowRAq5HAJ4tagADbGaxFu1WvSKYl9pZcsFs4gCgmwNv tDsw/tZ5vB0itN7IneoRVLw= =YXsF -----END PGP SIGNATURE----- --nextPart6193595.7Yc4fJACZC-- From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 28 02:58:42 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0578C106566C for ; Tue, 28 Oct 2008 02:58:42 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.191]) by mx1.freebsd.org (Postfix) with ESMTP id 7E09D8FC1C for ; Tue, 28 Oct 2008 02:58:41 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: by mu-out-0910.google.com with SMTP id i2so2070590mue.3 for ; Mon, 27 Oct 2008 19:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Cy4SnqHmpVlQp3f8TM+NnceYnpq8bfo4AABRNYtTv2g=; b=H6N1VtXAE7oeD+tUUq9c3RGa3IVIfMpoyRa0Qu7o4gSpgMHaEsypgvlMFAGQ1nSdwY Ops/nRC7/Ucm3zgAEmChjl1sGYdjTZotjQPVEHFJQ8PJx/9yEOVRivdIA1wZfwTfVFui 2rW2XHRkDhiutMr0lpwhkKPQXvW4hU4gF8f3s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=cdSvz4LYc/nEASauj69tb3je+Xiu7DHwpCocJIXkubmpzxAmPg4xGe6n2OrK+PnpP9 AtDfBiA8oGDwDQZOVMZCBfEmV/szn/K2sD3LAeI1T5ZtpT498/C3EV+Y9jSiq/Bt1g20 zO/7TgX11KBfv9YhMA3GSu3/3IRzeTp1oi1rc= Received: by 10.103.221.5 with SMTP id y5mr3127459muq.0.1225161398579; Mon, 27 Oct 2008 19:36:38 -0700 (PDT) Received: by 10.103.231.14 with HTTP; Mon, 27 Oct 2008 19:36:38 -0700 (PDT) Message-ID: Date: Tue, 28 Oct 2008 00:36:38 -0200 From: "Carlos A. M. dos Santos" To: "Ed Schouten" In-Reply-To: <20081026152707.GJ6808@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20081026152707.GJ6808@hoeg.nl> Cc: FreeBSD Hackers Subject: Re: [Testers wanted] /dev/console cleanups 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, 28 Oct 2008 02:58:42 -0000 On Sun, Oct 26, 2008 at 1:27 PM, Ed Schouten wrote: > Hello everyone, > > Most of you probably already know that I've been very busy improving our > kernel's TTY implementation. I've committed the new MPSAFE TTY layer > back in August. So far most of the things seem to work properly as far > as I can see. There are always some small bugs, but I'm confident we'll > get them fixed before 8.0. > > One of the things that I dislike about the code we have right now, is > the way /dev/console is implemented. There is a small amount of > complexity there, which is mainly because of the fact that our console > code actually works on two different levels: > > - We've got kernel messages that are printed using very low-level > routines and communicate directly with the drivers. > > - We've got user messages that are printed through /dev/console, which > actually work on the TTY level, but make use of a similar device > selection as the first set of routines. > > In an attempt to make /dev/console MPSAFE, I moved /dev/console into the > TTY layer itself, which makes it a lot more simple than it is now. > > Well, to keep a long story short, it would be wonderful if some people > could test the latest MPSAFE TTY patchset, just to make sure it doesn't > wreck people's setups after I commit this. So just apply the patch and > see if you can still boot your system, go into single user and multi > user mode, use conscontrol(8), etc. > > I've stored the latest MPSAFE TTY patchsets at the usual location. Make > sure you download the latest version. > > http://people.FreeBSD.org/~ed/mpsafetty/ > > The patchset also includes some other nice things, like some manual > pages (not finished) and a port of snp(4) to the new TTY layer (also not > finished). > > Thank you for your attention! The patched source builds and installs flawlessy. However I observed something that seems to be a regression. If I run either xconsole or xterm -C I only see kernel messages, even though my X startup (via XDM) changes the owner of /dev/console to the logged-in user. I mean, if I do some timg like "echo OK > /dev/console", the message is echoed on /dev/ttyv0, not by xconsole This is the same problem reported by Jeff Blank on RELENG_7: http://lists.freebsd.org/pipermail/freebsd-stable/2008-September/044949.html http://lists.freebsd.org/pipermail/freebsd-stable/2008-October/045885.html -- cd /usr/ports/sysutils/life make clean From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 28 07:46:35 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1870E106566C for ; Tue, 28 Oct 2008 07:46:35 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id B133E8FC13 for ; Tue, 28 Oct 2008 07:46:34 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=MwQ0b2J+Vb+61cVKdgMNNc3B8vlGycvOx6nP49FqNG/cz1SrJAFHG885E/ieDnDUfDcnn4ABStPvmaCjerDfgdzknF/bhJr7EgwYZc0jpPUYhU776cnExF/YejLQ5HWiGpNAz9T0Efx60L0QXbJ7JfRavgGN/Jh6v7Yku2ZNZJE=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1KujHc-0009JQ-PT; Tue, 28 Oct 2008 10:46:32 +0300 Date: Tue, 28 Oct 2008 10:46:31 +0300 From: Eygene Ryabinkin To: Srinivas Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Wfe1KbQWcwuymTys" Content-Disposition: inline In-Reply-To: Sender: rea-fbsd@codelabs.ru Cc: freebsd-hackers@freebsd.org Subject: Re: Usage of "files" for config 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, 28 Oct 2008 07:46:35 -0000 --Wfe1KbQWcwuymTys Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Srinivas, good day. Tue, Oct 28, 2008 at 03:52:35AM +0530, Srinivas wrote: > I would like to know the usage of files and files.[arch] in sys/conf. > Basically, I didnt get the advantage of having a common file for > compilation(like files) rather than an individual Makefile in each > subdirectory. 'files' and 'files.$ARCH' are the input directives for the config(8) utility. Makefile is produced with the help of these files. The rationale for having 'files' and 'files.$ARCH' is simple: there are platform-specific directives and common directives. >=20 > I have read makefile(of mkmakefile.c in config). What is the usage of > "standard", "optional" and "mandatory" and why it is followed by > device. Read comments from 'mkmakefile.c': ----- /* * If an entry is marked "mandatory", config will abort if it's * not called by a configuration line in the config file. Apart * from this, the device is handled like one marked "optional". */ ----- > What are .m files? What are they used for? They define module interfaces and are processed by the AWK script /sys/tools/makeobjops.awk. The output will be source and header files, named .c and .h. You can do 'ls *_if.[ch]' in the kernel build directory and examine some files to get a hint on what's going on. M-files are processed with the help of /sys/conf/kern.post.mk and /sys/conf/kmod.mk. > Why are some of the rules in the generated makefile *.ln like scsi_all.ln? These files are lint(1)'ed: see /sys/conf/kern.post.mk, search for LNFILES. > What is ${NORMAL_LINT} and ${NORMAL_C} in the generated makefile mean? 'make -V NORMAL_LINT' and 'make -V NORMAL_C' invoked from the kernel compilation directory should tell you about the values of these variables. They are defined by /sys/conf/kern.pre.mk, so you can examine it as well. --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual =20 )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook=20 {_.-``-' {_/ # --Wfe1KbQWcwuymTys Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkGw1cACgkQthUKNsbL7YglYQCeMAs/3VsUCnPmNWsIoZfpwO+9 ztEAoKbb9XRK6ecBNaNSLFT8ucpMQ/3v =X4FZ -----END PGP SIGNATURE----- --Wfe1KbQWcwuymTys-- From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 28 08:11:56 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C583106566B for ; Tue, 28 Oct 2008 08:11:56 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (unknown [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 9BB0F8FC1E for ; Tue, 28 Oct 2008 08:11:55 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 0ED701CE1B; Tue, 28 Oct 2008 09:11:54 +0100 (CET) Date: Tue, 28 Oct 2008 09:11:54 +0100 From: Ed Schouten To: "Carlos A. M. dos Santos" Message-ID: <20081028081154.GQ6808@hoeg.nl> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dO6Thh8T/cwyDjv9" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Hackers Subject: Re: [Testers wanted] /dev/console cleanups 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, 28 Oct 2008 08:11:56 -0000 --dO6Thh8T/cwyDjv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Carlos, * Carlos A. M. dos Santos wrote: > The patched source builds and installs flawlessy. However I observed > something that seems to be a regression. If I run either xconsole or > xterm -C I only see kernel messages, even though my X startup (via > XDM) changes the owner of /dev/console to the logged-in user. I mean, > if I do some timg like "echo OK > /dev/console", the message is echoed > on /dev/ttyv0, not by xconsole >=20 > This is the same problem reported by Jeff Blank on RELENG_7: >=20 > http://lists.freebsd.org/pipermail/freebsd-stable/2008-September/044949.h= tml > http://lists.freebsd.org/pipermail/freebsd-stable/2008-October/045885.html It's nice to hear that the patch didn't break anything on your system. I hope to receive more reviews, but I think I'll just commit it this weekend (with small modifications). About the /dev/console issues: Robert Watson and I discussed this some time ago on IRC and what I did in HEAD (not RELENG_7) was that I changed TIOCCONS not to take a look at the permissions of /dev/console, but we changed it to use priv_check(). This means that right now you can only call TIOCCONS as root. I can't really understand why the problem exists on RELENG_7. About making xconsole setuid: I've read the messages you mentioned, but I think we could just alter console to call TIOCCONS and just drop privileges. An even better solution would be to just get rid of TIOCCONS and invent a better solution to capture syslog messages. I can't really understand why we want to abuse TTY's to do this. So I can't say we're working on this, but at least I can confirm the issue. --=20 Ed Schouten WWW: http://80386.nl/ --dO6Thh8T/cwyDjv9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkGyUkACgkQ52SDGA2eCwVc1gCeIwUVwgvvnsffxO5coHibX5nl cKgAnRj1nzbLWDUtagsrOjlvK61TrVKL =XMCw -----END PGP SIGNATURE----- --dO6Thh8T/cwyDjv9-- From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 28 09:31:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EC35106566C for ; Tue, 28 Oct 2008 09:31:38 +0000 (UTC) (envelope-from mboxindia@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id A1A438FC1F for ; Tue, 28 Oct 2008 09:31:37 +0000 (UTC) (envelope-from mboxindia@gmail.com) Received: by ey-out-2122.google.com with SMTP id 6so966623eyi.7 for ; Tue, 28 Oct 2008 02:31:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=f2U0bwmezq6xvQ7WKz19ttNNfB+t1Q9vPbzJ1jcRU9w=; b=TnuPjQNkNUILJ4KTnZL3+EIxVKD+m7ops7m17fIWJtjWVQY7EXMGmk3Xq21W5H9F31 XRc8qSuublFMgl0o1LzpXhkUu7ZrQor2BYmwsy26wceDw9FYcSeQiiAYqgCqx8J5Q3Fz gAiY7qZSyuKBlHxiaw/zn25wO1w3vNd37qQyU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Qfh4BumiJkzj6qP1E22tOBzJBFXYT/bjehADRej/VlV8VzJHuUH3Ff1PvXAMb9dBDX a8Jb7IWXXp0p0IXvUC8dcCKJ8yPPKg/OJNu5w7LUs2tVIYoKnd1FzuzRFTJTAUso1AP+ RIVJKMeDNKIjLU8B1fri4JIUjNUWA2z8Lhefc= Received: by 10.103.173.5 with SMTP id a5mr3259436mup.117.1225186296221; Tue, 28 Oct 2008 02:31:36 -0700 (PDT) Received: by 10.103.141.5 with HTTP; Tue, 28 Oct 2008 02:31:36 -0700 (PDT) Message-ID: Date: Tue, 28 Oct 2008 15:01:36 +0530 From: Srinivas To: "Eygene Ryabinkin" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-hackers@freebsd.org Subject: Re: Usage of "files" for config 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, 28 Oct 2008 09:31:38 -0000 Eygene, Your reply is very helpful. Thank you very much. On Tue, Oct 28, 2008 at 1:16 PM, Eygene Ryabinkin wrote: >> I would like to know the usage of files and files.[arch] in sys/conf. >> Basically, I didnt get the advantage of having a common file for >> compilation(like files) rather than an individual Makefile in each >> subdirectory. > > 'files' and 'files.$ARCH' are the input directives for the config(8) > utility. Makefile is produced with the help of these files. The > rationale for having 'files' and 'files.$ARCH' is simple: there are > platform-specific directives and common directives. Still, I didnt get the purpose of having a common "files" file for the kernel to generate Makefile. I am trying to understand the advantage of this approach with the conventional way of having a makefile for each sub-directory(device or module) and recurse from top of kernel with a configuration file dictating what features need to be included in the kernel. Thanks, Srinivas From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 28 15:31:05 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44DCE106566B for ; Tue, 28 Oct 2008 15:31:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id BF0678FC0A for ; Tue, 28 Oct 2008 15:31:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9SFUCWm024647; Tue, 28 Oct 2008 11:30:51 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 28 Oct 2008 10:54:06 -0400 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810281054.07065.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Tue, 28 Oct 2008 11:30:51 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8526/Tue Oct 28 09:21:35 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Srinivas Subject: Re: Usage of "files" for config 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, 28 Oct 2008 15:31:05 -0000 On Tuesday 28 October 2008 05:31:36 am Srinivas wrote: > Eygene, Your reply is very helpful. Thank you very much. > > On Tue, Oct 28, 2008 at 1:16 PM, Eygene Ryabinkin wrote: > >> I would like to know the usage of files and files.[arch] in sys/conf. > >> Basically, I didnt get the advantage of having a common file for > >> compilation(like files) rather than an individual Makefile in each > >> subdirectory. > > > > 'files' and 'files.$ARCH' are the input directives for the config(8) > > utility. Makefile is produced with the help of these files. The > > rationale for having 'files' and 'files.$ARCH' is simple: there are > > platform-specific directives and common directives. > > Still, I didnt get the purpose of having a common "files" file for the > kernel to generate Makefile. > > I am trying to understand the advantage of this approach with the > conventional way of having a makefile for each sub-directory(device or > module) and recurse from top of kernel with a configuration file > dictating what features need to be included in the kernel. The usage of config goes back to BSD itself prior to FreeBSD for one. However, I find the 'files' format a lot easier to parse and work with then the mess of .ifdef's, etc. that would end up in 'kern/Makefile' for example. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 28 18:13:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3484F1065673 for ; Tue, 28 Oct 2008 18:13: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 B04848FC1B for ; Tue, 28 Oct 2008 18:13:46 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (pD9E2C65C.dip.t-dialin.net [217.226.198.92]) by redbull.bpaserver.net (Postfix) with ESMTP id A37802E0C9; Tue, 28 Oct 2008 19:13:40 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 8838C39CEB; Tue, 28 Oct 2008 19:13:37 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.14.2/8.13.8/Submit) id m9SIDZPH096438; Tue, 28 Oct 2008 19:13:35 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from 192.168.2.100 ([192.168.2.100]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 28 Oct 2008 19:13:35 +0100 Message-ID: <20081028191335.26152gicr4ni54ys@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Tue, 28 Oct 2008 19:13:35 +0100 From: Alexander Leidinger To: "Daniel O'Connor" References: <200810271411.m9REB6te015188@lurza.secnetix.de> <20081027.090116.-1827344390.imp@bsdimp.com> <200810281018.18786.doconnor@gsoft.com.au> In-Reply-To: <200810281018.18786.doconnor@gsoft.com.au> 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.3) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: A37802E0C9.91F1B X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-13.994, required 6, BAYES_00 -15.00, MIME_QP_LONG_LINE 1.40, NO_RDNS2 0.01, RDNS_DYNAMIC 0.10, SMILEY -0.50) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Tue, 28 Oct 2008 20:43:34 +0000 Cc: pisymbol@gmail.com, olli@lurza.secnetix.de, freebsd-hackers@freebsd.org, wojtek@wojtek.tensor.gdynia.pl, freebsd-questions@freebsd.org Subject: RTLD changes for non-native system (was: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit ?binaries?) 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, 28 Oct 2008 18:13:47 -0000 Quoting Daniel O'Connor (from Tue, 28 Oct 2008 =20 10:18:10 +1030): > On Tuesday 28 October 2008 01:31:16 M. Warner Losh wrote: >> In message: <200810271411.m9REB6te015188@lurza.secnetix.de> >> >> Oliver Fromme writes: >> : Daniel O'Connor wrote: >> : > On Friday 24 October 2008 23:20:59 Peter Jeremy wrote: >> : > > > this will make system trying to bind 32-bit libs to 64-bit >> : > > > program. it can't work >> : > > >> : > > rtld shouldn't attempt to bind 32-bit libs to 64-bit programs. >> : > >> : > The same problem happens with the Linux run time linker - it merrily >> : > tries to link FreeBSD libraries to Linux binaries with predictable >> : > results.. >> : >> : You *can* link Linux libraries with FreeBSD binaries (and >> : vice versa), if the library does not perform any syscalls, >> : e.g. it is a pure computation library or similar. >> : >> : > That said it would be really nice if it ignored incompatible librari= es >> : > :) >> : >> : No. Please don't put such pseudo-cleverness into rtld. >> : It wouldn't be an improvement, in fact it might break some >> : working configurations. >> >> Yes. I have a bunch of printer drivers that I've used that link in >> linux shared libraries... They are in ports... > > Good point.. > The problem is really the Linux linker - it will find a FreeBSD library an= d > try and use it ahead of a Linux one later in the search path - this preven= ts > stuff working :) > > I have this exact problem with libfontconfig and Xilinx ISE. > > Perhaps instead of ignore, use last.. But then it doesn't really matter fo= r > the FreeBSD linker - I imagine I would have to convince Linux folks it's a > good idea. Please ignore for a moment that we are not talking about changing the =20 FreeBSD RTLD anymore: Would it make sense (for us and/or for GNU) to first search for libs =20 for the current system and if none are found to try the others? Bye, Alexander. --=20 There is hardly a thing in the world that some man can not make a little worse and sell a little cheaper. 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 Wed Oct 29 21:08:54 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 525CE10656D5 for ; Wed, 29 Oct 2008 21:08:54 +0000 (UTC) (envelope-from jrytoung@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mx1.freebsd.org (Postfix) with ESMTP id BF6ED8FC14 for ; Wed, 29 Oct 2008 21:08:53 +0000 (UTC) (envelope-from jrytoung@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so76655ywe.13 for ; Wed, 29 Oct 2008 14:08:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=lD6eWArV/32IESEXwTijWJ6DsD4DE12mNfRNWRCu650=; b=jzrsB5+njVFSRXhYYy+cnQoOLEDxJVNUXsjuYjupJbcM0AMcHZdrA+HqDILsP5KgWy 5F9/Bsrr8PBy2rD5U7ZOO2ohzyFxWSjtuDR5VtfjXPuhNU8mEOfYS3me5D2/Wb71Klhs HE8G7Asxc2swK4j9ALnDMXGiepR3UssA6BXbk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=yD9uLvGhh9Og4fYuhGwVO9z6e3RyQQmFpAkkYUn0ulP02w6Kxk9g/rGIeLdknD/KSp MChEo2uqz9pS4JOkrnZdnAWrxzqPbpAEnwCsKf2nprHWBqduAa30qwdF028W/ZHehWdI y6QDSh8wr38Ah8X7OJ59ghJrUdDHV+Ds/RJCc= Received: by 10.90.91.9 with SMTP id o9mr7813257agb.117.1225313159838; Wed, 29 Oct 2008 13:45:59 -0700 (PDT) Received: by 10.90.86.20 with HTTP; Wed, 29 Oct 2008 13:45:59 -0700 (PDT) Message-ID: <86068e730810291345r738242b0lb8130bf6bd011015@mail.gmail.com> Date: Wed, 29 Oct 2008 13:45:59 -0700 From: "Jerry Toung" To: "Robert Watson" , freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: crash at in_pcb.c 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, 29 Oct 2008 21:08:54 -0000 Hello List, I can realiably reproduce this crash. We have a deamon that accept several connections per sec. We use iperf and Microsoft Web application stress 1.0 to push traffic to the FreeBSD box. Without further delay, the crash dump is below. I've been troubleshooting, but I am no longer sure if this is a race condition or a stack corruption. The socket pointer between frame 12 and 11 is different. This is on 6.2, but the code for 7.0 is identical, so I think it still applies. Any hint, patching or troubleshooting this is appreciated. Unread portion of the kernel message buffer: Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x2aef0210 fault code = supervisor read, page not present instruction pointer = 0x20:0xc0769098 stack pointer = 0x28:0xef781bc0 frame pointer = 0x28:0xef781bd0 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 1166 (ndaemon) trap number = 12 panic: page fault cpuid = 0 Uptime: 8h32m25s Dumping 3325 MB (3 chunks) #0 doadump () at pcpu.h:165 165 pcpu.h: No such file or directory. in pcpu.h (kgdb) l *0xc0769098 0xc0769098 is in in_pcblookup_local (/usr/src/sys/netinet/in_pcb.c:923). 918 /usr/src/sys/netinet/in_pcb.c: No such file or directory. in /usr/src/sys/netinet/in_pcb.c (kgdb) bt #0 doadump () at pcpu.h:165 #1 0xc06c2812 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:412 #2 0xc06c2bbd in panic (fmt=0xc0940872 "%s") at /usr/src/sys/kern/kern_shutdown.c:573 #3 0xc08f3e4e in trap_fatal (frame=0xef781b80, eva=720306704) at /usr/src/sys/i386/i386/trap.c:838 #4 0xc08f3b57 in trap_pfault (frame=0xef781b80, usermode=0, eva=720306704) at /usr/src/sys/i386/i386/trap.c:745 #5 0xc08f3745 in trap (frame= {tf_fs = -277348344, tf_es = 40, tf_ds = -913309656, tf_edi = 6, tf_esi = 0, tf_ebp = -277341232, tf_isp = -277341268, tf_ebx = -1062683820, tf_edx = 720306704, tf_ecx = 14063, tf_eax = 720306704, tf_trapno = 12, tf_err = 0, tf_eip = -1065971560, tf_cs = 32, tf_eflags = 66050, tf_esp = 0, tf_ss = -1062683820}) at /usr/src/sys/i386/i386/trap.c:435 #6 0xc08dddba in calltrap () at /usr/src/sys/i386/i386/exception.s:139 #7 0xc0769098 in in_pcblookup_local (pcbinfo=0x2aef0210, laddr={s_addr = 0}, lport_arg=720306704, wild_okay=1) at /usr/src/sys/netinet/in_pcb.c:923 #8 0xc0768452 in in_pcbbind_setup (inp=0xc97150b4, nam=0x36ef, laddrp=0xc97150ec, lportp=0xc97150ce, cred=0xc8726780) at /usr/src/sys/netinet/in_pcb.c:464 #9 0xc0767f56 in in_pcbbind (inp=0xc97150b4, nam=0x2aef0210, cred=0xc8726780) at /usr/src/sys/netinet/in_pcb.c:240 #10 0xc077f272 in tcp_connect (tp=0xc9897000, nam=0xc98a1ba0, td=0xc990e180) at /usr/src/sys/netinet/tcp_usrreq.c:864 #11 0xc077e141 in tcp_usr_connect (so=0xc9897000, nam=0xc98a1ba0, td=0xc990e180) at /usr/src/sys/netinet/tcp_usrreq.c:369 #12 0xc06fec4e in soconnect (so=0xc97b39bc, nam=0xc98a1ba0, td=0xc990e180) at /usr/src/sys/kern/uipc_socket.c:558 #13 0xc07046a8 in kern_connect (td=0xc990e180, fd=89, sa=0xc98a1ba0) at /usr/src/sys/kern/uipc_syscalls.c:536 #14 0xc070460f in connect (td=0xc990e180, uap=0xef781d04) at /usr/src/sys/kern/uipc_syscalls.c:505 #15 0xc08f4193 in syscall (frame= {tf_fs = 135725115, tf_es = 59, tf_ds = -1088487365, tf_edi = 135745024, tf_esi = -1089511444, tf_ebp = -1089514536, tf_isp = -277340828, tf_ebx = 671753396, tf_edx = 0, tf_ecx = 135524256, tf_eax = 98, tf_trapno = 0, tf_err = 2, tf_eip = 674451435, tf_cs = 51, tf_eflags = 642, tf_esp = -1089514580, tf_ss = 59}) at /usr/src/sys/i386/i386/trap.c:984 #16 0xc08dde0f in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:200 #17 0x00000033 in ?? () Previous frame inner to this frame (corrupt stack?) (kgdb) f 7 #7 0xc0769098 in in_pcblookup_local (pcbinfo=0x2aef0210, laddr={s_addr = 0}, lport_arg=720306704, wild_okay=1) at /usr/src/sys/netinet/in_pcb.c:923 923 in /usr/src/sys/netinet/in_pcb.c (kgdb) i loc phd = (struct inpcbport *) 0x2aef0210 tmphd = (struct inpcbport *) 0x2aef0210 match = (struct inpcb *) 0x0 inp = (struct inpcb *) 0x2aef0210 tmpinp = (struct inpcb *) 0x2aef0210 matchwild = 6 wildcard = -1062683820 lport = 14063 (kgdb) p phd $1 = (struct inpcbport *) 0x2aef0210 (kgdb) p phd->phd_port Cannot access memory at address 0x2aef021c (kgdb) f 12 #12 0xc06fec4e in soconnect (so=0xc97b39bc, nam=0xc98a1ba0, td=0xc990e180) at /usr/src/sys/kern/uipc_socket.c:558 558 /usr/src/sys/kern/uipc_socket.c: No such file or directory. in /usr/src/sys/kern/uipc_socket.c (kgdb) p so $2 = (struct socket *) 0xc97b39bc (kgdb) p nam $3 = (struct sockaddr *) 0xc98a1ba0 (kgdb) p td $4 = (struct thread *) 0xc990e180 (kgdb) l 553 in /usr/src/sys/kern/uipc_socket.c (kgdb) f 11 #11 0xc077e141 in tcp_usr_connect (so=0xc9897000, nam=0xc98a1ba0, td=0xc990e180) at /usr/src/sys/netinet/tcp_usrreq.c:369 369 /usr/src/sys/netinet/tcp_usrreq.c: No such file or directory. in /usr/src/sys/netinet/tcp_usrreq.c (kgdb) From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 29 21:48:11 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C189106564A; Wed, 29 Oct 2008 21:48:11 +0000 (UTC) (envelope-from jrytoung@gmail.com) Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.180]) by mx1.freebsd.org (Postfix) with ESMTP id 637D18FC08; Wed, 29 Oct 2008 21:48:10 +0000 (UTC) (envelope-from jrytoung@gmail.com) Received: by el-out-1112.google.com with SMTP id v27so111031ele.13 for ; Wed, 29 Oct 2008 14:48:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=2Sk8SIsNnFsvmANm/BWDCvRDjiDfU4Pn1sMBzp6CW40=; b=kt8Ks2PATGFY7L79YcSAtJga2gubwKrevlOwfOWFBiiISjwCJxp7dvGzWnvZ+6rLWD xI8KN6p6vQznfZ6c8WeWbDHrCs9rmbdUSkIBHl4i34F+bTCkB8gWm7U5+Q8OEhVNFCqm Cv2Z2tZYXn/oqrNjfNj3m3FtYqaZw/wDYfYNE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=gPNOTgK5jVZ7JNvumxhUQcL/zPDHggDqAUk1C+UsKYIxFukxf8gOItTtbiilYQSbB4 g7G2OZcMYhSmUwdQ0Fa8GDgfHmGtUeHSbkHEDvwjqPk581hrnEweEWrOEph7eJpDp7yF vRUWkaBPwokIYSi2d5Cq35qKQtDFw4z2vOVBM= Received: by 10.90.66.14 with SMTP id o14mr3344772aga.74.1225316889100; Wed, 29 Oct 2008 14:48:09 -0700 (PDT) Received: by 10.90.86.20 with HTTP; Wed, 29 Oct 2008 14:48:09 -0700 (PDT) Message-ID: <86068e730810291448t342ffaa6xe2abbf6804f29c5b@mail.gmail.com> Date: Wed, 29 Oct 2008 14:48:09 -0700 From: "Jerry Toung" To: "Kip Macy" In-Reply-To: <3c1674c90810291437n3f0d5132t52bc2fa4f4e1b9d0@mail.gmail.com> MIME-Version: 1.0 References: <86068e730810291345r738242b0lb8130bf6bd011015@mail.gmail.com> <3c1674c90810291437n3f0d5132t52bc2fa4f4e1b9d0@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: crash at in_pcb.c 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, 29 Oct 2008 21:48:11 -0000 On Wed, Oct 29, 2008 at 2:37 PM, Kip Macy wrote: > The code in 7.0 is actually locked quite differently. Could you please > try and reproduce on 7.0 and RELENG_7? > > ok. I'll keep you posted. Jerry From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 29 22:07:05 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16B011065674 for ; Wed, 29 Oct 2008 22:07:05 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mx1.freebsd.org (Postfix) with ESMTP id C22948FC1F for ; Wed, 29 Oct 2008 22:07:04 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so157025qwb.7 for ; Wed, 29 Oct 2008 15:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received: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; bh=j+5znhSHQpnBakcS9avZtYukOUN6Soe+Kg7x/6+YbNM=; b=FDmRoAKkA6k3IoR/i3aXfOJ+loYmO6xR5DYXUkYc1pJYyw62Zw0uG8IymlCTYR2PGo 8fWlJwyyCM6AGewk8izUHDvMSOBubdEDMOyr5VLRnKaxx1JBVDlZk4a0TKut0UHikYCy pbc1UHucc1jApVrVHTdzfQk0vpmtt5lwvcELo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=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=e5ZaKFkKqC2Bm0NvAHQl4j6+BB6OsJZ/XgAupwegmGXYMdA8m6JKiufNm35DDBmjqd jTOqQQpTMtzy9P5dTAfoSEi82aHL3bx55clWJLcnQXIj4eIYDY0qQCIPrtmFAVbP5DZV +VcgXXhG8LS+/ZsPxxW/k0HVe/nUXdmZgpUvw= Received: by 10.215.13.5 with SMTP id q5mr109526qai.347.1225316257463; Wed, 29 Oct 2008 14:37:37 -0700 (PDT) Received: by 10.100.177.11 with HTTP; Wed, 29 Oct 2008 14:37:37 -0700 (PDT) Message-ID: <3c1674c90810291437n3f0d5132t52bc2fa4f4e1b9d0@mail.gmail.com> Date: Wed, 29 Oct 2008 21:37:37 +0000 From: "Kip Macy" Sender: mat.macy@gmail.com To: "Jerry Toung" In-Reply-To: <86068e730810291345r738242b0lb8130bf6bd011015@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <86068e730810291345r738242b0lb8130bf6bd011015@mail.gmail.com> X-Google-Sender-Auth: ba5ee2bf20362a42 Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: crash at in_pcb.c 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, 29 Oct 2008 22:07:05 -0000 The code in 7.0 is actually locked quite differently. Could you please try and reproduce on 7.0 and RELENG_7? Thanks, Kip On Wed, Oct 29, 2008 at 8:45 PM, Jerry Toung wrote: > Hello List, > I can realiably reproduce this crash. We have a deamon that accept several > connections > per sec. We use iperf and Microsoft Web application stress 1.0 to push > traffic to the FreeBSD box. > Without further delay, the crash dump is below. I've been troubleshooting, > but I am no longer sure > if this is a race condition or a stack corruption. The socket pointer > between frame 12 and 11 is different. > This is on 6.2, but the code for 7.0 is identical, so I think it still > applies. > > Any hint, patching or troubleshooting this is appreciated. > > Unread portion of the kernel message buffer: > > > Fatal trap 12: page fault while in kernel mode > cpuid = 0; apic id = 00 > fault virtual address = 0x2aef0210 > fault code = supervisor read, page not present > instruction pointer = 0x20:0xc0769098 > stack pointer = 0x28:0xef781bc0 > frame pointer = 0x28:0xef781bd0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, def32 1, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 1166 (ndaemon) > trap number = 12 > panic: page fault > cpuid = 0 > Uptime: 8h32m25s > Dumping 3325 MB (3 chunks) > #0 doadump () at pcpu.h:165 > 165 pcpu.h: No such file or directory. > in pcpu.h > (kgdb) l *0xc0769098 > 0xc0769098 is in in_pcblookup_local (/usr/src/sys/netinet/in_pcb.c:923). > 918 /usr/src/sys/netinet/in_pcb.c: No such file or directory. > in /usr/src/sys/netinet/in_pcb.c > (kgdb) bt > #0 doadump () at pcpu.h:165 > #1 0xc06c2812 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:412 > #2 0xc06c2bbd in panic (fmt=0xc0940872 "%s") at > /usr/src/sys/kern/kern_shutdown.c:573 > #3 0xc08f3e4e in trap_fatal (frame=0xef781b80, eva=720306704) at > /usr/src/sys/i386/i386/trap.c:838 > #4 0xc08f3b57 in trap_pfault (frame=0xef781b80, usermode=0, eva=720306704) > at /usr/src/sys/i386/i386/trap.c:745 > #5 0xc08f3745 in trap (frame= > {tf_fs = -277348344, tf_es = 40, tf_ds = -913309656, tf_edi = 6, > tf_esi = 0, tf_ebp = -277341232, tf_isp = -277341268, tf_ebx = -1062683820, > tf_edx = 720306704, tf_ecx = 14063, tf_eax = 720306704, tf_trapno = 12, > tf_err = 0, tf_eip = -1065971560, tf_cs = 32, tf_eflags = 66050, tf_esp = 0, > tf_ss = -1062683820}) at /usr/src/sys/i386/i386/trap.c:435 > #6 0xc08dddba in calltrap () at /usr/src/sys/i386/i386/exception.s:139 > #7 0xc0769098 in in_pcblookup_local (pcbinfo=0x2aef0210, laddr={s_addr = > 0}, lport_arg=720306704, wild_okay=1) > at /usr/src/sys/netinet/in_pcb.c:923 > #8 0xc0768452 in in_pcbbind_setup (inp=0xc97150b4, nam=0x36ef, > laddrp=0xc97150ec, lportp=0xc97150ce, cred=0xc8726780) > at /usr/src/sys/netinet/in_pcb.c:464 > #9 0xc0767f56 in in_pcbbind (inp=0xc97150b4, nam=0x2aef0210, > cred=0xc8726780) at /usr/src/sys/netinet/in_pcb.c:240 > #10 0xc077f272 in tcp_connect (tp=0xc9897000, nam=0xc98a1ba0, td=0xc990e180) > at /usr/src/sys/netinet/tcp_usrreq.c:864 > #11 0xc077e141 in tcp_usr_connect (so=0xc9897000, nam=0xc98a1ba0, > td=0xc990e180) > at /usr/src/sys/netinet/tcp_usrreq.c:369 > #12 0xc06fec4e in soconnect (so=0xc97b39bc, nam=0xc98a1ba0, td=0xc990e180) > at /usr/src/sys/kern/uipc_socket.c:558 > #13 0xc07046a8 in kern_connect (td=0xc990e180, fd=89, sa=0xc98a1ba0) at > /usr/src/sys/kern/uipc_syscalls.c:536 > #14 0xc070460f in connect (td=0xc990e180, uap=0xef781d04) at > /usr/src/sys/kern/uipc_syscalls.c:505 > #15 0xc08f4193 in syscall (frame= > {tf_fs = 135725115, tf_es = 59, tf_ds = -1088487365, tf_edi = > 135745024, tf_esi = -1089511444, tf_ebp = -1089514536, tf_isp = -277340828, > tf_ebx = 671753396, tf_edx = 0, tf_ecx = 135524256, tf_eax = 98, tf_trapno = > 0, tf_err = 2, tf_eip = 674451435, tf_cs = 51, tf_eflags = 642, tf_esp = > -1089514580, tf_ss = 59}) at /usr/src/sys/i386/i386/trap.c:984 > #16 0xc08dde0f in Xint0x80_syscall () at > /usr/src/sys/i386/i386/exception.s:200 > #17 0x00000033 in ?? () > Previous frame inner to this frame (corrupt stack?) > (kgdb) f 7 > #7 0xc0769098 in in_pcblookup_local (pcbinfo=0x2aef0210, laddr={s_addr = > 0}, lport_arg=720306704, wild_okay=1) > at /usr/src/sys/netinet/in_pcb.c:923 > 923 in /usr/src/sys/netinet/in_pcb.c > (kgdb) i loc > phd = (struct inpcbport *) 0x2aef0210 > tmphd = (struct inpcbport *) 0x2aef0210 > match = (struct inpcb *) 0x0 > inp = (struct inpcb *) 0x2aef0210 > tmpinp = (struct inpcb *) 0x2aef0210 > matchwild = 6 > wildcard = -1062683820 > lport = 14063 > (kgdb) p phd > $1 = (struct inpcbport *) 0x2aef0210 > (kgdb) p phd->phd_port > Cannot access memory at address 0x2aef021c > > (kgdb) f 12 > #12 0xc06fec4e in soconnect (so=0xc97b39bc, nam=0xc98a1ba0, td=0xc990e180) > at /usr/src/sys/kern/uipc_socket.c:558 > 558 /usr/src/sys/kern/uipc_socket.c: No such file or directory. > in /usr/src/sys/kern/uipc_socket.c > (kgdb) p so > $2 = (struct socket *) 0xc97b39bc > (kgdb) p nam > $3 = (struct sockaddr *) 0xc98a1ba0 > (kgdb) p td > $4 = (struct thread *) 0xc990e180 > (kgdb) l > 553 in /usr/src/sys/kern/uipc_socket.c > (kgdb) f 11 > #11 0xc077e141 in tcp_usr_connect (so=0xc9897000, nam=0xc98a1ba0, > td=0xc990e180) > at /usr/src/sys/netinet/tcp_usrreq.c:369 > 369 /usr/src/sys/netinet/tcp_usrreq.c: No such file or directory. > in /usr/src/sys/netinet/tcp_usrreq.c > (kgdb) > _______________________________________________ > 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 Wed Oct 29 22:30:49 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC1501065676; Wed, 29 Oct 2008 22:30:49 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.170]) by mx1.freebsd.org (Postfix) with ESMTP id 9806E8FC25; Wed, 29 Oct 2008 22:30:49 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so221765wfg.7 for ; Wed, 29 Oct 2008 15:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=qSmySDDFTVGEJEdvUeYdOJb4XzplEM0QQTDVwAdyH1Q=; b=MbW1Vw+p28QKSVcraE/NG2G+l4mnLmUp/n2eLthIFxHk1byJNlGIyUyF0L93TTUo6K 12HVRnbUWaOTm5gyUCnsFsNU6DYRcUEXoVVWy5BsFTgwchzQFfHi83108jjUcx/dFayJ lh+RISLZErzFTiaKoekPbBHWDfUT0LBPRFfD0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=JdHJdHjerM08TOhR+HZrQKRKGchWSKIzzhkxVMj22lTqxwczWO88/qtPfPYAmM4uMX zRmmfwifaBgldg4LW69IaOuoHbvjQzB3vm75xYxpJMqrbRUOOBG1l8nDaZz2C1jaOijc x9AsnTc2vy24dPWgLW0bKVwCSvWDCABaGt+SI= Received: by 10.142.185.13 with SMTP id i13mr4271710wff.219.1225319449137; Wed, 29 Oct 2008 15:30:49 -0700 (PDT) Received: by 10.142.141.5 with HTTP; Wed, 29 Oct 2008 15:30:49 -0700 (PDT) Message-ID: <539c60b90810291530v54712qe801c094ebcdecd1@mail.gmail.com> Date: Wed, 29 Oct 2008 15:30:49 -0700 From: "Steve Franks" Sender: bahamasfranks@gmail.com To: "Jeremy Chadwick" In-Reply-To: <20081025081305.GA55683@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> <4902CC86.8030408@bokey.mine.nu> <20081025075648.GB55339@icarus.home.lan> <4902D1FA.3070003@bokey.mine.nu> <20081025081305.GA55683@icarus.home.lan> X-Google-Sender-Auth: 660b5b83d23a1f28 Cc: freebsd-hackers Subject: Re: neophyte: tcsetattr() gives 22 error in i386, not in amd64? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: stevefranks@ieee.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 22:30:49 -0000 >> >>>> Hi, >> >>>> >> >>>> I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which >> >>>> was working under 7-STABLE amd64. Serial device is a ucom (silabs >> >>>> cp2103). Permissions on /dev/cuaU0 look fine. Cutecom/Minicom >> >>>> appears to open the port without error... >> >>> I don't see anything obviously wrong, but I'd bet a bug related to >> >>> 32/64-bit types. Can you post a complete piece of code that can be >> >>> compiled and run and demonstrates the problem? Also, try compiling with >> >>> -Wall -W and investigate any warnings that are produced. >> >>> >> >>> By the way, errno 22 is EINVAL, "Invalid argument". perror() is your >> >>> friend. >> >> Strange freebsd doesnt document error numbers. On POSIX, errno 22 is >> >> EINVAL as well (documented in errno(3)). Is this applicable to freebsd? >> > >> > /usr/include/errno.h isn't documentation of error numbers? >> > If you're wanting to track down how/why tcsetattr(3) results in EINVAL, > using truss or ktrace might come in handy. Otherwise, you literally > will have to throw some debugging code into the ucom(4) driver to > try and figure out what function is kicking out code 22. Wow! truss is quite handy. I've located the problem, and am posting it for posterity: Someone was memset()'ing the termios struct to zero's, then setting the baudrate (setcfspeed) and a couple other things. Apparently this was not a canonical set of required members of the struct, because adding a tcgetattr(f, termio) right after the memset apparently pre-populated the thing correctly and now it works fine... Thanks for the leg up, Jeremy. Best, Steve From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 29 22:56:43 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECF9B1065670 for ; Wed, 29 Oct 2008 22:56:43 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mx1.freebsd.org (Postfix) with ESMTP id 853CC8FC1A for ; Wed, 29 Oct 2008 22:56:43 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so98556yxb.13 for ; Wed, 29 Oct 2008 15:56:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Lp99BqscHf1ZRRb+eeq2wYiqRPpILoMwfC8DUfY649Q=; b=VpTmegP3W7M8Z66CJHTKpH3lp2HkUo+7hCIab/qYLotGmE8DDKr8WkRsd+lPVWGEBb 1TIg8gS+pbz2X93zo5oPPivfukcJhvGAoap5cLBeD27cATUFFE+FZWnjuZbWN18Ey3d7 Xob/e3nDKPoJo6XU/yY+Vgnac+AHhvSARzKX0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Cu1DjwgtIJfgCfLdqa05mVNoxjVACHG+facnxwcKfR6WOAszIBPp6QWf7wbzqyS0tx Ngw/ZRClOttv3xuos5lFFgypJ9qqv28Eiufj71kPD7NhwECMj6zyeb7ZvCt3n02qfwHB umFjvjdlEHQ0pjjZRA9dve2n1eiFH7Z5Y781o= Received: by 10.90.33.15 with SMTP id g15mr7957029agg.0.1225319579531; Wed, 29 Oct 2008 15:32:59 -0700 (PDT) Received: by 10.90.81.10 with HTTP; Wed, 29 Oct 2008 15:32:59 -0700 (PDT) Message-ID: Date: Thu, 30 Oct 2008 01:32:59 +0300 From: pluknet To: "Jerry Toung" In-Reply-To: <86068e730810291345r738242b0lb8130bf6bd011015@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <86068e730810291345r738242b0lb8130bf6bd011015@mail.gmail.com> Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: crash at in_pcb.c 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, 29 Oct 2008 22:56:44 -0000 2008/10/29 Jerry Toung : > Hello List, > I can realiably reproduce this crash. We have a deamon that accept several > connections > per sec. We use iperf and Microsoft Web application stress 1.0 to push > traffic to the FreeBSD box. > Without further delay, the crash dump is below. I've been troubleshooting, > but I am no longer sure > if this is a race condition or a stack corruption. The socket pointer > between frame 12 and 11 is different. > This is on 6.2, but the code for 7.0 is identical, so I think it still > applies. > > Any hint, patching or troubleshooting this is appreciated. > > Unread portion of the kernel message buffer: > > > Fatal trap 12: page fault while in kernel mode > cpuid = 0; apic id = 00 > fault virtual address = 0x2aef0210 > fault code = supervisor read, page not present > instruction pointer = 0x20:0xc0769098 > stack pointer = 0x28:0xef781bc0 > frame pointer = 0x28:0xef781bd0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, def32 1, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 1166 (ndaemon) > trap number = 12 > panic: page fault > cpuid = 0 > Uptime: 8h32m25s > Dumping 3325 MB (3 chunks) > #0 doadump () at pcpu.h:165 > 165 pcpu.h: No such file or directory. > in pcpu.h > (kgdb) l *0xc0769098 > 0xc0769098 is in in_pcblookup_local (/usr/src/sys/netinet/in_pcb.c:923). > 918 /usr/src/sys/netinet/in_pcb.c: No such file or directory. > in /usr/src/sys/netinet/in_pcb.c > (kgdb) bt > #0 doadump () at pcpu.h:165 > #1 0xc06c2812 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:412 > #2 0xc06c2bbd in panic (fmt=0xc0940872 "%s") at > /usr/src/sys/kern/kern_shutdown.c:573 > #3 0xc08f3e4e in trap_fatal (frame=0xef781b80, eva=720306704) at > /usr/src/sys/i386/i386/trap.c:838 > #4 0xc08f3b57 in trap_pfault (frame=0xef781b80, usermode=0, eva=720306704) > at /usr/src/sys/i386/i386/trap.c:745 > #5 0xc08f3745 in trap (frame= > {tf_fs = -277348344, tf_es = 40, tf_ds = -913309656, tf_edi = 6, > tf_esi = 0, tf_ebp = -277341232, tf_isp = -277341268, tf_ebx = -1062683820, > tf_edx = 720306704, tf_ecx = 14063, tf_eax = 720306704, tf_trapno = 12, > tf_err = 0, tf_eip = -1065971560, tf_cs = 32, tf_eflags = 66050, tf_esp = 0, > tf_ss = -1062683820}) at /usr/src/sys/i386/i386/trap.c:435 > #6 0xc08dddba in calltrap () at /usr/src/sys/i386/i386/exception.s:139 > #7 0xc0769098 in in_pcblookup_local (pcbinfo=0x2aef0210, laddr={s_addr = > 0}, lport_arg=720306704, wild_okay=1) > at /usr/src/sys/netinet/in_pcb.c:923 > #8 0xc0768452 in in_pcbbind_setup (inp=0xc97150b4, nam=0x36ef, > laddrp=0xc97150ec, lportp=0xc97150ce, cred=0xc8726780) > at /usr/src/sys/netinet/in_pcb.c:464 > #9 0xc0767f56 in in_pcbbind (inp=0xc97150b4, nam=0x2aef0210, > cred=0xc8726780) at /usr/src/sys/netinet/in_pcb.c:240 > #10 0xc077f272 in tcp_connect (tp=0xc9897000, nam=0xc98a1ba0, td=0xc990e180) > at /usr/src/sys/netinet/tcp_usrreq.c:864 > #11 0xc077e141 in tcp_usr_connect (so=0xc9897000, nam=0xc98a1ba0, > td=0xc990e180) > at /usr/src/sys/netinet/tcp_usrreq.c:369 > #12 0xc06fec4e in soconnect (so=0xc97b39bc, nam=0xc98a1ba0, td=0xc990e180) > at /usr/src/sys/kern/uipc_socket.c:558 > #13 0xc07046a8 in kern_connect (td=0xc990e180, fd=89, sa=0xc98a1ba0) at > /usr/src/sys/kern/uipc_syscalls.c:536 > #14 0xc070460f in connect (td=0xc990e180, uap=0xef781d04) at > /usr/src/sys/kern/uipc_syscalls.c:505 > #15 0xc08f4193 in syscall (frame= > {tf_fs = 135725115, tf_es = 59, tf_ds = -1088487365, tf_edi = > 135745024, tf_esi = -1089511444, tf_ebp = -1089514536, tf_isp = -277340828, > tf_ebx = 671753396, tf_edx = 0, tf_ecx = 135524256, tf_eax = 98, tf_trapno = > 0, tf_err = 2, tf_eip = 674451435, tf_cs = 51, tf_eflags = 642, tf_esp = > -1089514580, tf_ss = 59}) at /usr/src/sys/i386/i386/trap.c:984 > #16 0xc08dde0f in Xint0x80_syscall () at > /usr/src/sys/i386/i386/exception.s:200 > #17 0x00000033 in ?? () > Previous frame inner to this frame (corrupt stack?) > (kgdb) f 7 > #7 0xc0769098 in in_pcblookup_local (pcbinfo=0x2aef0210, laddr={s_addr = > 0}, lport_arg=720306704, wild_okay=1) > at /usr/src/sys/netinet/in_pcb.c:923 > 923 in /usr/src/sys/netinet/in_pcb.c > (kgdb) i loc > phd = (struct inpcbport *) 0x2aef0210 > tmphd = (struct inpcbport *) 0x2aef0210 > match = (struct inpcb *) 0x0 > inp = (struct inpcb *) 0x2aef0210 > tmpinp = (struct inpcb *) 0x2aef0210 > matchwild = 6 > wildcard = -1062683820 > lport = 14063 > (kgdb) p phd > $1 = (struct inpcbport *) 0x2aef0210 > (kgdb) p phd->phd_port > Cannot access memory at address 0x2aef021c > > (kgdb) f 12 > #12 0xc06fec4e in soconnect (so=0xc97b39bc, nam=0xc98a1ba0, td=0xc990e180) > at /usr/src/sys/kern/uipc_socket.c:558 > 558 /usr/src/sys/kern/uipc_socket.c: No such file or directory. > in /usr/src/sys/kern/uipc_socket.c > (kgdb) p so > $2 = (struct socket *) 0xc97b39bc > (kgdb) p nam > $3 = (struct sockaddr *) 0xc98a1ba0 > (kgdb) p td > $4 = (struct thread *) 0xc990e180 > (kgdb) l > 553 in /usr/src/sys/kern/uipc_socket.c > (kgdb) f 11 > #11 0xc077e141 in tcp_usr_connect (so=0xc9897000, nam=0xc98a1ba0, > td=0xc990e180) > at /usr/src/sys/netinet/tcp_usrreq.c:369 > 369 /usr/src/sys/netinet/tcp_usrreq.c: No such file or directory. > in /usr/src/sys/netinet/tcp_usrreq.c > (kgdb) Could you please get the following from kgdb? f 7 p *inp p *inp->inp_laddr P.S. It's definitely 7.0 backtrace (or close to).. 6.2 has different line numbers. -- wbr, pluknet From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 30 11:21:18 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 041B6106564A for ; Thu, 30 Oct 2008 11:21:18 +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 B78AA8FC23 for ; Thu, 30 Oct 2008 11:21:17 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 1C5806D43F; Thu, 30 Oct 2008 11:21:16 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 0480784494; Thu, 30 Oct 2008 12:21:15 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Srinivas References: Date: Thu, 30 Oct 2008 12:21:15 +0100 In-Reply-To: (Srinivas's message of "Tue, 28 Oct 2008 03:52:35 +0530") Message-ID: <8663naib10.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Usage of "files" for config 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, 30 Oct 2008 11:21:18 -0000 Srinivas writes: > I would like to know the usage of files and files.[arch] in sys/conf. "files" and "options" are used to determine which source files should be included and which preprocessor macros should be defined according to the "device" and "option" lines in the kernel config. However, as a "beginner of freebsd kernel", I would recommend that you spend your time reading (and writing or modifying) source code, not trying to understand the Makefiles. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 30 12:32:31 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 028FC1065677 for ; Thu, 30 Oct 2008 12:32:31 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from mail.pica.nl (mail.pica.nl [192.87.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id 8E9AF8FC0A for ; Thu, 30 Oct 2008 12:32:30 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from rebelion.Sisis.de ([10.0.1.29]) by mail.pica.nl with Microsoft SMTPSVC(6.0.3790.3959); Thu, 30 Oct 2008 13:20:23 +0100 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id m9UCKNdq025427 for freebsd-hackers@freebsd.org; Thu, 30 Oct 2008 13:20:23 +0100 (CET) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Thu, 30 Oct 2008 13:20:23 +0100 From: Matthias Apitz To: freebsd-hackers@freebsd.org Message-ID: <20081030122023.GA25223@rebelion.Sisis.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) X-OriginalArrivalTime: 30 Oct 2008 12:20:23.0836 (UTC) FILETIME=[E24C6DC0:01C93A89] Subject: 7.0R && amd does not unmount USB-based UFS X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 12:32:31 -0000 Hello, I'm using the amd to mount CDFS and MSDOSFS on USB without any kind of problems for years; now I formated a new USB key with UFS, added the config in amd's map and encounter that it does not unmount the file system after the configured time of 20 secs: any idea? thanks in advance; matthias details: # cat /etc/amdmaps/amd.ufs ufs type:=ufs;fs:=/mnt/ufs;dev:=/dev/da0s1a;opts:=rw # tail -f /var/log/amd Oct 30 12:06:04 rebelion amd[23331]/info: /f: disabling nfs congestion window Oct 30 12:06:04 rebelion amd[23328]/info: initializing amd.conf map /etc/amdmaps/amd.usb of type file Oct 30 12:06:04 rebelion amd[23328]/info: first time load of map /etc/amdmaps/amd.usb succeeded Oct 30 12:06:04 rebelion amd[23328]/info: /etc/amdmaps/amd.usb mounted fstype toplvl on /u Oct 30 12:06:04 rebelion amd[23328]/info: initializing amd.conf map /etc/amdmaps/amd.cdrom of type file Oct 30 12:06:04 rebelion amd[23328]/info: first time load of map /etc/amdmaps/amd.cdrom succeeded Oct 30 12:06:04 rebelion amd[23328]/info: /etc/amdmaps/amd.cdrom mounted fstype toplvl on /a Oct 30 12:06:04 rebelion amd[23328]/info: initializing amd.conf map /etc/amdmaps/amd.ufs of type file Oct 30 12:06:04 rebelion amd[23328]/info: first time load of map /etc/amdmaps/amd.ufs succeeded Oct 30 12:06:04 rebelion amd[23328]/info: /etc/amdmaps/amd.ufs mounted fstype toplvl on /f entering the dir /f/ufs mounts the FS: Oct 30 12:08:02 rebelion amd[23328]/map: Trying mount of /dev/da0s1a on /f/usf fstype ufs Oct 30 12:08:02 rebelion amd[23328]/info: /dev/da0s1a mounted fstype ufs on /mnt/ufs here another example of entering /a/cdrom which gets unmounted after 20 secs: Oct 30 12:54:49 rebelion amd[23328]/map: Trying mount of /dev/acd0 on /a/cdrom fstype cdfs Oct 30 12:54:50 rebelion amd[23328]/error: /cdrom: mount: Input/output error Oct 30 12:54:50 rebelion amd[23328]/error: mount_cdfs: Input/output error Oct 30 12:54:59 rebelion amd[23328]/map: Trying mount of /dev/acd0 on /a/cdrom fstype cdfs Oct 30 12:55:00 rebelion amd[23328]/info: /dev/acd0 mounted fstype cdfs on /cdrom Oct 30 12:55:20 rebelion amd[23328]/info: /dev/acd0 unmounted fstype cdfs from /cdrom the UFS stays mounted forever: $ mount /dev/ad4s1a on / (ufs, local) devfs on /dev (devfs, local) /dev/ad4s1e on /tmp (ufs, local, soft-updates) /dev/ad4s1f on /usr (ufs, local, soft-updates) /dev/ad4s1d on /var (ufs, local, soft-updates) pid23328@rebelion:/u on /u (nfs) pid23328@rebelion:/a on /a (nfs) pid23328@rebelion:/f on /f (nfs) /dev/da0s1a on /mnt/ufs (ufs, local) a umount by hand helps: # umount /mnt/ufs # mount /dev/ad4s1a on / (ufs, local) devfs on /dev (devfs, local) /dev/ad4s1e on /tmp (ufs, local, soft-updates) /dev/ad4s1f on /usr (ufs, local, soft-updates) /dev/ad4s1d on /var (ufs, local, soft-updates) pid23328@rebelion:/u on /u (nfs) pid23328@rebelion:/a on /a (nfs) pid23328@rebelion:/f on /f (nfs) -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ A computer is like an air conditioner, it stops working when you open Windows Una computadora es como aire acondicionado, deja de funcionar si abres Windows From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 30 13:22:23 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55B531065676 for ; Thu, 30 Oct 2008 13:22:23 +0000 (UTC) (envelope-from aniketpansare@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mx1.freebsd.org (Postfix) with ESMTP id 0D9188FC24 for ; Thu, 30 Oct 2008 13:22:22 +0000 (UTC) (envelope-from aniketpansare@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so194424yxb.13 for ; Thu, 30 Oct 2008 06:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=gVqjWrQ6AaDKlAV8NH/rZlfgW+CZmCPZRn9Prb6J4e4=; b=jXhYrA4cZsLR5Lipnmm5nI7WjwDhYDiWabfzvT0VBPVpOGw0WJDBs1CFWizSvWoegY kG8MVSvznHeQweHzrrQa4H1fcGFyVlvntcvxv+yRC1GrA4AbvH8o22I4GoM6+PDWLzdH gBn70TDIuu6WhTGAeFwa7xvXKNwguQyJvXvaM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=mgwg4JbOMk4RZhrPIFRqVulYOkJrtFEjLA56RUBydxnObebG3hgJIRJYs0Jo8fF72N p/APFvfWCKnLl6lmS3gzG43fRfjRWRog9kMQmdSufd6TtolYUiyIHjY0Yldr/vLwNOgy GoD0wi9Kt0OUTIpkFQKqcuAKykNHiwFKUfc9U= Received: by 10.151.109.11 with SMTP id l11mr3456193ybm.181.1225371732584; Thu, 30 Oct 2008 06:02:12 -0700 (PDT) Received: by 10.150.197.11 with HTTP; Thu, 30 Oct 2008 06:02:12 -0700 (PDT) Message-ID: <35a750510810300602w6ed15a83m6780284601deed7b@mail.gmail.com> Date: Thu, 30 Oct 2008 18:32:12 +0530 From: "aniket pansare" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: process hibernation and process descriptor table 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, 30 Oct 2008 13:22:23 -0000 hi guys i am doing a project on process hibernation. i am new to linux and i want u to tell me how can i print the contents of a process descriptor table. i had a look at the softwares like cryopid and BLCR but i am not able to get it at this stage. Any suggestions about how i should go about the project. Aniket Pansare From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 30 15:38:21 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 264B81065678 for ; Thu, 30 Oct 2008 15:38:21 +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 DBED78FC08 for ; Thu, 30 Oct 2008 15:38:20 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id E51466D43F; Thu, 30 Oct 2008 15:38:19 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id CC72D8447C; Thu, 30 Oct 2008 16:38:19 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "aniket pansare" References: <35a750510810300602w6ed15a83m6780284601deed7b@mail.gmail.com> Date: Thu, 30 Oct 2008 16:38:19 +0100 In-Reply-To: <35a750510810300602w6ed15a83m6780284601deed7b@mail.gmail.com> (aniket pansare's message of "Thu, 30 Oct 2008 18:32:12 +0530") Message-ID: <86skqegkk4.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: process hibernation and process descriptor table 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, 30 Oct 2008 15:38:21 -0000 "aniket pansare" writes: > i am new to linux and i want u to tell me how can i print the contents of= a > process descriptor table. You should probably ask some Linux people. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 30 15:47:14 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FDC41065675 for ; Thu, 30 Oct 2008 15:47:14 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA06.westchester.pa.mail.comcast.net (qmta06.westchester.pa.mail.comcast.net [76.96.62.56]) by mx1.freebsd.org (Postfix) with ESMTP id D37FB8FC17 for ; Thu, 30 Oct 2008 15:47:13 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA10.westchester.pa.mail.comcast.net ([76.96.62.28]) by QMTA06.westchester.pa.mail.comcast.net with comcast id Z0yv1a0010cZkys563mjBn; Thu, 30 Oct 2008 15:46:43 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA10.westchester.pa.mail.comcast.net with comcast id Z3nC1a0012P6wsM3W3nCS2; Thu, 30 Oct 2008 15:47:12 +0000 X-Authority-Analysis: v=1.0 c=1 a=QycZ5dHgAAAA:8 a=rsvOncigLXaxPRxJ5bwA:9 a=_ny0s83bTFZhnML9DesDFqnUJMsA:4 a=EoioJ0NPDVgA:10 a=CWfAmLVWKswA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id A9B24C9419; Thu, 30 Oct 2008 08:47:11 -0700 (PDT) Date: Thu, 30 Oct 2008 08:47:11 -0700 From: Jeremy Chadwick To: freebsd-hackers@freebsd.org Message-ID: <20081030154711.GA8416@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Subject: open(2) and O_NOATIME 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, 30 Oct 2008 15:47:14 -0000 I've recently been reading about Linux's O_NOATIME flag to open(2), and I'm curious why we haven't implemented this. There seem to be a lot of good reasons to implement such a thing. Chances are it's due to lack of time/interest, which is expected, but I was wondering if there were other reasons. I realise mount's noatime trumps this, but there are lots of scenarios where atime is desired as a default, but disabled in specific cases. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 30 15:47:20 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 342941065670; Thu, 30 Oct 2008 15:47:20 +0000 (UTC) (envelope-from jrytoung@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id C213F8FC08; Thu, 30 Oct 2008 15:47:19 +0000 (UTC) (envelope-from jrytoung@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so242884yxb.13 for ; Thu, 30 Oct 2008 08:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=EbPUZGRzFH1LCuuIgJPa7Et5t1Pcoc8Io0PqQgbpIoE=; b=daxoA1Q8UEQQv/jrQdX+KcT1VeJd41Q1aD9C9Z+AtbTHnO2EqrVEz0jhiV4vrhsCQ2 Q1oj8FAsKiMqr9WG1SwjTeObiF0Yd6oXZKrIZLasximIchcamj3R730+YgdddedNcqRF Jq2dUekQKfX2qQo1Q2NtryfdoWsCcs/jo/DrI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=PEKBBh3/V4HKvPsCB1wPJW7f+Ef6y7bLjvClHG6ML8wz9e772BoNpCNxNAgaX0dWjD UtR+yw//jYQW1RbTb0hYTb+YorghQ2jTEgrBbPbAHbV017d29O0j8qh0u8PdFwFZLPyL WGeEfOe8dYXVAK0tGMZNWO5zI49ECJo2+3lTw= Received: by 10.90.106.1 with SMTP id e1mr113615agc.107.1225381638913; Thu, 30 Oct 2008 08:47:18 -0700 (PDT) Received: by 10.90.86.20 with HTTP; Thu, 30 Oct 2008 08:47:18 -0700 (PDT) Message-ID: <86068e730810300847j64cafdeqab8b3b6a5f59b949@mail.gmail.com> Date: Thu, 30 Oct 2008 08:47:18 -0700 From: "Jerry Toung" To: pluknet In-Reply-To: MIME-Version: 1.0 References: <86068e730810291345r738242b0lb8130bf6bd011015@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: crash at in_pcb.c 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, 30 Oct 2008 15:47:20 -0000 On Wed, Oct 29, 2008 at 3:32 PM, pluknet wrote: > > Could you please get the following from kgdb? > f 7 > p *inp > p *inp->inp_laddr > > P.S. It's definitely 7.0 backtrace (or close to).. 6.2 has different > line numbers. > kgdb) f 7 #7 0xc0769098 in in_pcblookup_local (pcbinfo=0x2aef0210, laddr={s_addr = 0}, lport_arg=720306704, wild_okay=1) at /usr/src/sys/netinet/in_pcb.c:923 923 /usr/src/sys/netinet/in_pcb.c: No such file or directory. in /usr/src/sys/netinet/in_pcb.c (kgdb) p *inp Cannot access memory at address 0x2aef0210 (kgdb) p *inp->inp_laddr There is no member named inp_laddr. (kgdb) From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 30 15:52:20 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A798106564A for ; Thu, 30 Oct 2008 15:52:20 +0000 (UTC) (envelope-from jamesfrancistoy@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id 1B7258FC17 for ; Thu, 30 Oct 2008 15:52:19 +0000 (UTC) (envelope-from jamesfrancistoy@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so243236ywe.13 for ; Thu, 30 Oct 2008 08:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=3fGghD4oQyLZGCSyHmoZ+C8rLfdvFnPNjut17bJV6Gw=; b=TzrrumXjnDPIHEOca3jKjqisDGTnWmkYOT2hP47Xs9GL4OtEUwIvMSdfjbDNVKG7um Ohn9JCxYoBsRrCpBHMdhomrRAaEw3C7k6LRCgFTlTR8tiZ0yUQuZ2sZfKBdZ9TNM12Yy AcC068WAe5SGxAn9ZweWeF76jzidM5j9Zo2Tw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=dLmlX8p2OY3cZpr3ALva0NXKaMKQL6MXI1x+a9xZy3LhKwxtaAwolD9f5HATY0x2+E A0xrq44S5zhRexiBg13htgvOkMTq1+6ad8tPuub1szYpmSQrIteCENe6j8XIQMIEvEEe t5vX/RhHGiaF9JbIBDka7rQLr0LsfOqhZEn6M= Received: by 10.150.92.13 with SMTP id p13mr1595041ybb.36.1225380337467; Thu, 30 Oct 2008 08:25:37 -0700 (PDT) Received: by 10.150.98.8 with HTTP; Thu, 30 Oct 2008 08:25:37 -0700 (PDT) Message-ID: <9f8af95f0810300825g5b0fae82u85002e56434b3edd@mail.gmail.com> Date: Thu, 30 Oct 2008 11:25:37 -0400 From: jT Sender: jamesfrancistoy@gmail.com To: "aniket pansare" , freebsd-hackers@freebsd.org In-Reply-To: <35a750510810300602w6ed15a83m6780284601deed7b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <35a750510810300602w6ed15a83m6780284601deed7b@mail.gmail.com> X-Google-Sender-Auth: f234e2f417cd842c Cc: Subject: Re: process hibernation and process descriptor table 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, 30 Oct 2008 15:52:20 -0000 Hello, This list is unrelated to linux, it was designed for technical discussion concerning the FreeBSD operating system: www.freebsd.org. If you are looking for linux help I recommend you check kernel.org for documentation and online forums. On 10/30/08, aniket pansare wrote: > hi guys > i am doing a project on process hibernation. > i am new to linux and i want u to tell me how can i print the contents of a > process descriptor table. > > i had a look at the softwares like cryopid and BLCR but i am not able to get > it at this stage. > > Any suggestions about how i should go about the project. > > > > Aniket Pansare > _______________________________________________ > 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" > -- /jT http://git.zen-sources.org/?p=kernel/zenmm.git;a=summary From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 30 16:33:42 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4946F106567A for ; Thu, 30 Oct 2008 16:33:42 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id A50CC8FC1A for ; Thu, 30 Oct 2008 16:33:41 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id 0677C43F23E for ; Thu, 30 Oct 2008 18:08:45 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VdzWYDIKgnSo for ; Thu, 30 Oct 2008 18:08:44 +0200 (EET) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [91.198.50.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id AE48C43E356 for ; Thu, 30 Oct 2008 18:08:44 +0200 (EET) Message-ID: <4909DC03.1080901@icyb.net.ua> Date: Thu, 30 Oct 2008 18:08:35 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: memtest86+ can not link: binutils issue? 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, 30 Oct 2008 16:33:42 -0000 0. FreeBSD 7.1-PRERELEASE r184195 i386 $ ld -v GNU ld version 2.15 [FreeBSD] 2004-05-23 1. obtain and extract http://www.memtest.org/download/2.01/memtest86+-2.01.bin.gz 2. run gmake: $ gmake gcc -E -traditional head.S -o head.s as -32 -o head.o head.s gcc -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-strict-aliasing reloc.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o main.o main.c gcc -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding test.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o init.o init.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o lib.o lib.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o patn.o patn.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o screen_buffer.o screen_buffer.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o config.o config.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o linuxbios.o linuxbios.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o memsize.o memsize.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o pci.o pci.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o controller.o controller.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o random.o random.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o extra.o extra.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o spd.o spd.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o error.o error.c gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -c -o dmi.o dmi.c ld --warn-constructors --warn-common -static -T memtest_shared.lds \ -o memtest_shared head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o config.o linuxbios.o memsize.o pci.o controller.o random.o extra.o spd.o error.o dmi.o && \ ld -shared -Bsymbolic -T memtest_shared.lds -o memtest_shared head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o config.o linuxbios.o memsize.o pci.o controller.o random.o extra.o spd.o error.o dmi.o head.o(.text+0x7): In function `startup_32': : undefined reference to `_GLOBAL_OFFSET_TABLE_' Segmentation fault (core dumped) gmake: *** [memtest_shared] Error 139 Not only linking fails, but ld even crashes. Things are more complicated than usual because of the custom linker script memtest_shared.lds. The same compiles/links nicely on Fedora 9. $ ld -v GNU ld version 2.18.50.0.6-5.fc9 20080403 Can anybody suggest anything about this problem? If somebody is working on newer version of binuitls for FreeBSD I can help as a tester. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 30 18:46:32 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86E551065674 for ; Thu, 30 Oct 2008 18:46:32 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by mx1.freebsd.org (Postfix) with ESMTP id 1B25F8FC0A for ; Thu, 30 Oct 2008 18:46:31 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c122-106-215-175.belrs3.nsw.optusnet.com.au [122.106.215.175]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m9UIkRhQ017108 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 31 Oct 2008 05:46:30 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id m9UIkQBf065714; Fri, 31 Oct 2008 05:46:26 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id m9UIkPKn065713; Fri, 31 Oct 2008 05:46:25 +1100 (EST) (envelope-from peter) Date: Fri, 31 Oct 2008 05:46:25 +1100 From: Peter Jeremy To: Andriy Gapon Message-ID: <20081030184625.GA99398@server.vk2pj.dyndns.org> References: <4909DC03.1080901@icyb.net.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline In-Reply-To: <4909DC03.1080901@icyb.net.ua> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: memtest86+ can not link: binutils issue? 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, 30 Oct 2008 18:46:32 -0000 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2008-Oct-30 18:08:35 +0200, Andriy Gapon wrote: >1. obtain and extract >http://www.memtest.org/download/2.01/memtest86+-2.01.bin.gz This is a compressed bootable image and can't be compiled. Possibly you mean http://www.memtest.org/download/2.01/memtest86+-2.01.tar.gz >2. run gmake: >$ gmake >gcc -E -traditional head.S -o head.s >as -32 -o head.o head.s >gcc -c -Wall -march=3Di486 -m32 -Os -fomit-frame-pointer -fno-builtin >-ffreestanding -fPIC -fno-strict-aliasing reloc.c >gcc -Wall -march=3Di486 -m32 -Os -fomit-frame-pointer -fno-builtin >-ffreestanding -fPIC -c -o main.o main.c >gcc -c -Wall -march=3Di486 -m32 -Os -fomit-frame-pointer -fno-builtin >-ffreestanding test.c Blows up at this point for me: gcc -c -Wall -march=3Di486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffre= estanding test.c test.c:14:20: error: sys/io.h: No such file or directory test.c: In function 'beep': test.c:1410: warning: implicit declaration of function 'outb_p' test.c:1410: warning: implicit declaration of function 'inb_p' test.c:1417: warning: implicit declaration of function 'outb' gmake: *** [test.o] Error 1 I can't find in CVS or any declarations for outb_p or inb_p in my source tree. >ld --warn-constructors --warn-common -static -T memtest_shared.lds \ > -o memtest_shared head.o reloc.o main.o test.o init.o lib.o >patn.o screen_buffer.o config.o linuxbios.o memsize.o pci.o controller.o >random.o extra.o spd.o error.o dmi.o && \ > ld -shared -Bsymbolic -T memtest_shared.lds -o memtest_shared >head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o >config.o linuxbios.o memsize.o pci.o controller.o random.o extra.o spd.o >error.o dmi.o >head.o(.text+0x7): In function `startup_32': >: undefined reference to `_GLOBAL_OFFSET_TABLE_' >Segmentation fault (core dumped) >gmake: *** [memtest_shared] Error 139 I can't help here. _GLOBAL_OFFSET_TABLE_ is related to the binutils PIC support and it appears that the linker doesn't like the code (in head.S) is explicitly referencing it. >Not only linking fails, but ld even crashes. I agree this shouldn't happen. >Can anybody suggest anything about this problem? It looks like stand-alone PIC code on FreeBSD needs some different incantations to Linux. My understanding is that several of the i386 bootstraps are relocatable so you might like to peruse the code in /usr/src/sys/boot/i386 for ideas. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkKAQEACgkQ/opHv/APuIenPACeP23KxKxwHhnUk82BZHgW0JST 8bQAn1a41Ti/4d8q8ZGSvHBJ/a4grW8x =aW3q -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 02:16:57 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B7E01065672; Fri, 31 Oct 2008 02:16:57 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id E6F728FC08; Fri, 31 Oct 2008 02:16:56 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id D767428449; Fri, 31 Oct 2008 10:16:55 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 7C31DEB9E54; Fri, 31 Oct 2008 10:16:55 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id 7YTczj-ml35t; Fri, 31 Oct 2008 10:16:50 +0800 (CST) Received: from charlie.delphij.net (adsl-76-237-33-62.dsl.pltn13.sbcglobal.net [76.237.33.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 66A9CEB99EF; Fri, 31 Oct 2008 10:16:47 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=xKVoX4K1aXbB7DEOqUWSw+4ZvD8KbSQQA0eT497RXdHL5+hqCk647oR6qaYlBT03S UEIaRD3PRzbxZHYH6lsdw== Message-ID: <490A6A8A.7080504@delphij.net> Date: Thu, 30 Oct 2008 19:16:42 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.17 (X11/20080928) MIME-Version: 1.0 To: Jeremy Chadwick References: <20081030154711.GA8416@icarus.home.lan> In-Reply-To: <20081030154711.GA8416@icarus.home.lan> X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: open(2) and O_NOATIME X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 02:16:57 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jeremy Chadwick wrote: > I've recently been reading about Linux's O_NOATIME flag to open(2), and > I'm curious why we haven't implemented this. There seem to be a lot of > good reasons to implement such a thing. > > Chances are it's due to lack of time/interest, which is expected, but I > was wondering if there were other reasons. > > I realise mount's noatime trumps this, but there are lots of scenarios > where atime is desired as a default, but disabled in specific cases. Em... Allowing administrators to disable NOATIME would be a good thing, but wouldn't allowing arbitrary program to decide whether atime should be changed, be a serious security disaster? Disclaimer: I'm not a big atime fan myself, actually I disable atime on a lot of my servers for performance reasons :) Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkKaooACgkQi+vbBBjt66CImQCgj51GGHXFaGhsFk4fAAWhmfV5 +s4An2Hn2TCVhqXEpzEL3xNwxy6YE84M =n7f/ -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 02:40:37 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 736F81065677 for ; Fri, 31 Oct 2008 02:40:37 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id 307338FC17 for ; Fri, 31 Oct 2008 02:40:37 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (localhost [IPv6:::1]) by www.sonnenberger.org (Postfix) with ESMTP id 227396E1EF for ; Fri, 31 Oct 2008 03:20:45 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id 19C6093C8F; Fri, 31 Oct 2008 03:18:23 +0100 (CET) Date: Fri, 31 Oct 2008 03:18:23 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20081031021823.GA575@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20081030154711.GA8416@icarus.home.lan> <490A6A8A.7080504@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <490A6A8A.7080504@delphij.net> User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: open(2) and O_NOATIME 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, 31 Oct 2008 02:40:37 -0000 On Thu, Oct 30, 2008 at 07:16:42PM -0700, Xin LI wrote: > Em... Allowing administrators to disable NOATIME would be a good thing, > but wouldn't allowing arbitrary program to decide whether atime should > be changed, be a serious security disaster? Think of backup programs. Joerg From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 02:47:55 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A9281065674 for ; Fri, 31 Oct 2008 02:47:55 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA03.emeryville.ca.mail.comcast.net (qmta03.emeryville.ca.mail.comcast.net [76.96.30.32]) by mx1.freebsd.org (Postfix) with ESMTP id ECD218FC17 for ; Fri, 31 Oct 2008 02:47:53 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA10.emeryville.ca.mail.comcast.net ([76.96.30.28]) by QMTA03.emeryville.ca.mail.comcast.net with comcast id ZDeH1a0030cQ2SLA3Ens3d; Fri, 31 Oct 2008 02:47:53 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA10.emeryville.ca.mail.comcast.net with comcast id ZEno1a00R2P6wsM8WEnp31; Fri, 31 Oct 2008 02:47:49 +0000 X-Authority-Analysis: v=1.0 c=1 a=QycZ5dHgAAAA:8 a=IUjdoAngzvuBnAJZmFcA:9 a=rE8zq9MS7sWbhS2oG8sA:7 a=TiCyosy-KFNnVkiGHJNO5oavs-oA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id B075DC9419; Thu, 30 Oct 2008 19:47:48 -0700 (PDT) Date: Thu, 30 Oct 2008 19:47:48 -0700 From: Jeremy Chadwick To: d@delphij.net Message-ID: <20081031024748.GA20319@icarus.home.lan> References: <20081030154711.GA8416@icarus.home.lan> <490A6A8A.7080504@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <490A6A8A.7080504@delphij.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: open(2) and O_NOATIME 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, 31 Oct 2008 02:47:55 -0000 On Thu, Oct 30, 2008 at 07:16:42PM -0700, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Jeremy Chadwick wrote: > > I've recently been reading about Linux's O_NOATIME flag to open(2), and > > I'm curious why we haven't implemented this. There seem to be a lot of > > good reasons to implement such a thing. > > > > Chances are it's due to lack of time/interest, which is expected, but I > > was wondering if there were other reasons. > > > > I realise mount's noatime trumps this, but there are lots of scenarios > > where atime is desired as a default, but disabled in specific cases. > > Em... Allowing administrators to disable NOATIME would be a good thing, > but wouldn't allowing arbitrary program to decide whether atime should > be changed, be a serious security disaster? How? There's only one condition I can think of: where a system administrator is, for some reason, relying upon atimes as a form of proof of something bad happening (which is a horrible concept in general, being as the amount of false positives seen would be tremendous; using atime as a security auditing method is stupid). If that's what you were referring to, then possibly making O_NOATIME only to root would be a suitable compromise. > Disclaimer: I'm not a big atime fan myself, actually I disable atime on > a lot of my servers for performance reasons :) I can't disable atime on any systems I maintain, because they all provide access to classic UNIX mbox spools where atime is used to determine if new mail has arrived. The instant filesystem-level backups run, atime is lost, and users have no way of knowing if they have new mail or not. Switching to Maildir is an option, but the performance hit of readdir() + stat() on thousands of files is tremendous (which is why mail clients like mutt have features like "header caching" via Oracle/Sleepycat DB). Anyway, I just was reading about it and realise that a lot of backup solutions out there can make use of O_NOATIME if available, which it isn't on FreeBSD. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 09:54:10 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B21371065677 for ; Fri, 31 Oct 2008 09:54:10 +0000 (UTC) (envelope-from cayson.z@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.185]) by mx1.freebsd.org (Postfix) with ESMTP id 53E808FC1C for ; Fri, 31 Oct 2008 09:54:09 +0000 (UTC) (envelope-from cayson.z@gmail.com) Received: by ti-out-0910.google.com with SMTP id d27so628730tid.3 for ; Fri, 31 Oct 2008 02:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=iGdAZBpwGmlwpt380TPTk1isCgCgP0pFQ7fCzX/+ufg=; b=Mu6V2UKX9eEWpQM7Ytrg7cGf+m7eoa/GttG18Eu+YjSP0MHNV8hyjMo6Xqgq+p6HLZ AYo9bbndpvPXWOmVtw9mxaONFgrMoKPwYtjEnWXQQhDR+6IQyU7GbA3Y8lNECKftOS1J rBHoMPicdTfGts6YiX2dnKachjvjmLPFxnBUw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=sSJ7+IxW/K0/Mcn3R27ezjLikMKDKirGWcTHm18atKyblxnkAfWYv7Ka+gKGuov/wp 4j0OaYI8pNTcndKJBK5d9xLybsEP1XG4Y7JxCoMNdRkMDpdYQ8u1V1Ayxl1JfmOzbL2s aU61Ao8IVrImRAczOOZFa3rN1rREE5phhQ8oE= Received: by 10.110.50.19 with SMTP id x19mr8153672tix.40.1225445002552; Fri, 31 Oct 2008 02:23:22 -0700 (PDT) Received: by 10.110.40.2 with HTTP; Fri, 31 Oct 2008 02:23:22 -0700 (PDT) Message-ID: Date: Fri, 31 Oct 2008 17:23:22 +0800 From: Boern To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Is there virtualbox ports? 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, 31 Oct 2008 09:54:10 -0000 Hi,all: I am ready to intall sun xVM VirtualBox on my FreeBSD7.0,but have no found in the ports,anybody can help me? -- Boern Parx From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 10:54:43 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6632106567D for ; Fri, 31 Oct 2008 10:54:43 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.freebsd.org (Postfix) with ESMTP id CA5748FC13 for ; Fri, 31 Oct 2008 10:54:42 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: by nf-out-0910.google.com with SMTP id h3so517161nfh.33 for ; Fri, 31 Oct 2008 03:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=UgGlJqeUdrMfzptYMEQSFv6+iifo9faSX9j4seQpCUI=; b=oFKRoUKC6lviHuzv1cpqaQp1ageMbtRbEJoRUiptLAnSYEXEejtn2PGPqaacGtr9kY HEd0L91VZvppZ5TyWz/H2JDPuqe1OC2QuRzuHQifDR3XmbgFfVV1FM6F0oSFFKhcgSPm e8a5VOZk0QMp3bJgjR+R689ahV66jREOm2CPU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=GUj0q6xbGhNxFM61Ofx26Edxph0lOPlwCxy+PEp++wAVqtgI4+DBY1ZtIX+CFiMzT9 XEXpr2frX1cf1kM7WTmthpeTcsqFue/m5v0Z0dYKod4TiEgdyGVk5JKij/LdGAf6W724 CrgOY/p5RWyGVoP13e7tSXA5i7UhFHrzTIyzw= Received: by 10.103.160.3 with SMTP id m3mr5431570muo.69.1225450481277; Fri, 31 Oct 2008 03:54:41 -0700 (PDT) Received: by 10.103.137.8 with HTTP; Fri, 31 Oct 2008 03:54:41 -0700 (PDT) Message-ID: Date: Fri, 31 Oct 2008 08:54:41 -0200 From: "Carlos A. M. dos Santos" To: Boern In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-hackers@freebsd.org Subject: Re: Is there virtualbox ports? 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, 31 Oct 2008 10:54:43 -0000 On Fri, Oct 31, 2008 at 7:23 AM, Boern wrote: > Hi,all: > I am ready to intall sun xVM VirtualBox on my FreeBSD7.0,but have no > found in the ports,anybody can help me? There is no port. VirtualBox depends on a kernel module that was not ported to FreeBSD yet, among other things. There was some discussion on the -virtualization mailing list. Take a look at the "VirtualBox looks for FreeBSD developer" thread in http://lists.freebsd.org/pipermail/freebsd-virtualization/2008-September/thread.html http://lists.freebsd.org/pipermail/freebsd-virtualization/2008-October/thread.html -- cd /usr/ports/sysutils/life make clean From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 08:04:49 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 513411065672 for ; Fri, 31 Oct 2008 08:04:49 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id 0BBDB8FC1E for ; Fri, 31 Oct 2008 08:04:48 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so396478qwb.7 for ; Fri, 31 Oct 2008 01:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=9gMvonrty8B7knMiLqAh4GkzK4tprCeEZFSs7ayhpPM=; b=VVbkv3TpGKXSRf2jw4o4sbpcHoWzh3x0lPyyiDqpIYHL1QOz/0oC9xWyihEWb/J6jR /J+x9solC2rSdfi6RJE+uc8VE/czkcDoeMKtriZzDd7DQfokNWTRv0CmQQ3eWawbp5hP dCU/+deD/lBuuhrrb4hb9S0+mE40egPazscjM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=XtjDyKaQrO8t0k6IcuLMmQPJd4TtVckJtUB7slqueuJQA6gfLEPPNUO0j0GO9HB9q4 FR5vOaqS7o7/YgBYDAJkcGsXVOVmkdPSlNuouXOTS1vMm73U7Licy8NRpiVysvqx0REc j5mMv6nl2A2yIyg0SYD7GMU7N2xZpR+yNs38E= Received: by 10.214.113.17 with SMTP id l17mr8871274qac.49.1225440288178; Fri, 31 Oct 2008 01:04:48 -0700 (PDT) Received: by 10.214.243.20 with HTTP; Fri, 31 Oct 2008 01:04:48 -0700 (PDT) Message-ID: Date: Fri, 31 Oct 2008 08:04:48 +0000 From: "Igor Mozolevsky" To: "Jeremy Chadwick" In-Reply-To: <20081031024748.GA20319@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20081030154711.GA8416@icarus.home.lan> <490A6A8A.7080504@delphij.net> <20081031024748.GA20319@icarus.home.lan> X-Mailman-Approved-At: Fri, 31 Oct 2008 11:23:50 +0000 Cc: freebsd-hackers@freebsd.org, d@delphij.net Subject: Re: open(2) and O_NOATIME 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, 31 Oct 2008 08:04:49 -0000 2008/10/31 Jeremy Chadwick : > ... If that's what you were referring to, then possibly making O_NOATIME > only to root would be a suitable compromise. And no systems are compromised with rootkits?.. Igor :-) From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 10:20:27 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 881BE106564A for ; Fri, 31 Oct 2008 10:20:27 +0000 (UTC) (envelope-from lars.engels@0x20.net) Received: from mail.0x20.net (unknown [IPv6:2001:aa8:fffb::3]) by mx1.freebsd.org (Postfix) with ESMTP id 1AD668FC22 for ; Fri, 31 Oct 2008 10:20:27 +0000 (UTC) (envelope-from lars.engels@0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.67.217]) by mail.0x20.net (Postfix) with ESMTP id D5D573A581; Fri, 31 Oct 2008 11:20:25 +0100 (CET) Received: from i011-63.fin-nrw.de (i011-63.fin-nrw.de [193.109.238.130]) by 0x20.net (Horde MIME library) with HTTP; Fri, 31 Oct 2008 11:20:25 +0100 Message-ID: <20081031112025.c2hg8pb1usg0ocg4@0x20.net> X-Priority: 3 (Normal) Date: Fri, 31 Oct 2008 11:20:25 +0100 From: Lars Engels To: Boern References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_559vf9cag944"; protocol="application/pgp-signature"; micalg="pgp-sha1" Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) X-Mailman-Approved-At: Fri, 31 Oct 2008 11:24:39 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Is there virtualbox ports? 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, 31 Oct 2008 10:20:27 -0000 This message is in MIME format and has been PGP signed. --=_559vf9cag944 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit Quoting Boern : > Hi,all: > I am ready to intall sun xVM VirtualBox on my FreeBSD7.0,but have no > found in the ports,anybody can help me? > VirtualBox doesn't work on FreeBSD... --=_559vf9cag944 Content-Type: application/pgp-signature Content-Description: Digitale PGP-Unterschrift Content-Disposition: inline Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEABECAAYFAkkK2+kACgkQKc512sD3afiJnACffEYv2VqoRL5iIkWS9CdIA9o0 t8sAn38fcxcuPfyAUtLawUquOKAPi3cK =jSRK -----END PGP SIGNATURE----- --=_559vf9cag944-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 13:18:58 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED1C610656A6 for ; Fri, 31 Oct 2008 13:18:58 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id 66FBF8FC1D for ; Fri, 31 Oct 2008 13:18:58 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id 0C86D74408E; Fri, 31 Oct 2008 15:18:56 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zqqe+hB41qeC; Fri, 31 Oct 2008 15:18:55 +0200 (EET) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [91.198.50.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id E38DD744005; Fri, 31 Oct 2008 15:18:52 +0200 (EET) Message-ID: <490B05BA.9090306@icyb.net.ua> Date: Fri, 31 Oct 2008 15:18:50 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: Peter Jeremy References: <4909DC03.1080901@icyb.net.ua> <20081030184625.GA99398@server.vk2pj.dyndns.org> In-Reply-To: <20081030184625.GA99398@server.vk2pj.dyndns.org> Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: memtest86+ can not link: binutils issue? 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, 31 Oct 2008 13:18:59 -0000 on 30/10/2008 20:46 Peter Jeremy said the following: > On 2008-Oct-30 18:08:35 +0200, Andriy Gapon wrote: >> 1. obtain and extract >> http://www.memtest.org/download/2.01/memtest86+-2.01.bin.gz > > This is a compressed bootable image and can't be compiled. Possibly > you mean http://www.memtest.org/download/2.01/memtest86+-2.01.tar.gz Sorry - yes, this was it. >> 2. run gmake: >> $ gmake >> gcc -E -traditional head.S -o head.s >> as -32 -o head.o head.s >> gcc -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin >> -ffreestanding -fPIC -fno-strict-aliasing reloc.c >> gcc -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin >> -ffreestanding -fPIC -c -o main.o main.c >> gcc -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin >> -ffreestanding test.c > > Blows up at this point for me: > gcc -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding test.c > test.c:14:20: error: sys/io.h: No such file or directory > test.c: In function 'beep': > test.c:1410: warning: implicit declaration of function 'outb_p' > test.c:1410: warning: implicit declaration of function 'inb_p' > test.c:1417: warning: implicit declaration of function 'outb' > gmake: *** [test.o] Error 1 > > I can't find in CVS or any declarations for outb_p or inb_p > in my source tree. Sorry again - I patched this file to remove inclusion of this linux-specific file and instead include machine/cpufunc.h, also I changed outb_p => outb, inb_p => inb and swapped parameters of outb-s. These are typical linuxisms. >> ld --warn-constructors --warn-common -static -T memtest_shared.lds \ >> -o memtest_shared head.o reloc.o main.o test.o init.o lib.o >> patn.o screen_buffer.o config.o linuxbios.o memsize.o pci.o controller.o >> random.o extra.o spd.o error.o dmi.o && \ >> ld -shared -Bsymbolic -T memtest_shared.lds -o memtest_shared >> head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o >> config.o linuxbios.o memsize.o pci.o controller.o random.o extra.o spd.o >> error.o dmi.o >> head.o(.text+0x7): In function `startup_32': >> : undefined reference to `_GLOBAL_OFFSET_TABLE_' >> Segmentation fault (core dumped) >> gmake: *** [memtest_shared] Error 139 > > I can't help here. _GLOBAL_OFFSET_TABLE_ is related to the binutils > PIC support and it appears that the linker doesn't like the code (in > head.S) is explicitly referencing it. > >> Not only linking fails, but ld even crashes. > > I agree this shouldn't happen. > >> Can anybody suggest anything about this problem? > > It looks like stand-alone PIC code on FreeBSD needs some different > incantations to Linux. My understanding is that several of the > i386 bootstraps are relocatable so you might like to peruse the > code in /usr/src/sys/boot/i386 for ideas. I wonder if this is something about out port of binutils or is it an issue in older version of binutils. I'll try to look at the boot code, thank you for the hint. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 13:48:50 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5191A1065680 for ; Fri, 31 Oct 2008 13:48:50 +0000 (UTC) (envelope-from fb-hackers@psconsult.nl) Received: from mx1.psconsult.nl (psc11.adsl.iaf.nl [80.89.238.138]) by mx1.freebsd.org (Postfix) with ESMTP id D3CD68FC1D for ; Fri, 31 Oct 2008 13:48:49 +0000 (UTC) (envelope-from fb-hackers@psconsult.nl) Received: from mx1.psconsult.nl (localhost [80.89.238.138]) by mx1.psconsult.nl (8.14.2/8.14.2) with ESMTP id m9VDmhfL015404 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 31 Oct 2008 14:48:48 +0100 (CET) (envelope-from fb-hackers@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.2/8.14.2/Submit) id m9VDmhdT015403 for freebsd-hackers@freebsd.org; Fri, 31 Oct 2008 14:48:43 +0100 (CET) (envelope-from fb-hackers@psconsult.nl) Date: Fri, 31 Oct 2008 14:48:42 +0100 From: Paul Schenkeveld To: freebsd-hackers@freebsd.org Message-ID: <20081031134842.GA15218@psconsult.nl> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20081030154711.GA8416@icarus.home.lan> <490A6A8A.7080504@delphij.net> <20081031024748.GA20319@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: open(2) and O_NOATIME 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, 31 Oct 2008 13:48:50 -0000 On Fri, Oct 31, 2008 at 08:04:48AM +0000, Igor Mozolevsky wrote: > 2008/10/31 Jeremy Chadwick : > > > ... If that's what you were referring to, then possibly making O_NOATIME > > only to root would be a suitable compromise. > > And no systems are compromised with rootkits?.. utimes(2) allows non-root users to (re)set atime provided they own the file or have write permission. Having O_NOATIME follow the same rules would not break any assumed security any further than utimes(2) already does but greatfully benefit all kind of backup programs. So I'd be more than happy to see O_NOATIME be implemented as I'm currently experimenting with backups to detachable harddisks using rsync and not having a way to reset atime is my one big reason for not deploying this kind of backups with more servers. If you wonder why I'm using rsyng instead of dump or tar, here are two reasons: first the detachable disks are much slower than the systems disks so rsync saves a lot of time and secondly a file-by-file-only-if-changed scheme allows me to efficiently use snapshots on the backup medium. Patching rsync to implement the kind of reset atime as i.e. cpio does looks far more complex than adding O_NOATIME to rsync. My $0.02 Regards, Paul Schenkeveld From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 15:51:20 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53C0B1065674 for ; Fri, 31 Oct 2008 15:51:20 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (meestal-mk5.stack.nl [IPv6:2001:610:1108:5010::149]) by mx1.freebsd.org (Postfix) with ESMTP id 081348FC25 for ; Fri, 31 Oct 2008 15:51:20 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 183BE3F696 for ; Fri, 31 Oct 2008 16:51:18 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 0619822899; Fri, 31 Oct 2008 16:51:17 +0100 (CET) Date: Fri, 31 Oct 2008 16:51:17 +0100 From: Jilles Tjoelker To: freebsd-hackers@freebsd.org Message-ID: <20081031155117.GA55445@stack.nl> References: <20081030154711.GA8416@icarus.home.lan> <490A6A8A.7080504@delphij.net> <20081031024748.GA20319@icarus.home.lan> <20081031134842.GA15218@psconsult.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081031134842.GA15218@psconsult.nl> X-Operating-System: FreeBSD 7.1-PRERELEASE i386 User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: open(2) and O_NOATIME 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, 31 Oct 2008 15:51:20 -0000 On Fri, Oct 31, 2008 at 02:48:42PM +0100, Paul Schenkeveld wrote: > utimes(2) allows non-root users to (re)set atime provided they own the > file or have write permission. Having O_NOATIME follow the same rules > would not break any assumed security any further than utimes(2) already > does but greatfully benefit all kind of backup programs. This is not entirely correct. utimes(2) with NULL timestamps (reset atime and mtime to current time) is allowed to root, owner or with write permission, but utimes(2) with given timestamps is only allowed to root and owner. O_NOATIME seems equivalent to the latter, and in fact this is the case in Linux (if someone else than root or the owner tries to open a file with O_NOATIME, they get EPERM). There's only a small detail missing: any utimes(2) call updates the ctime, so you can see "something" happened to the file. Linux's O_NOATIME does not update any times at all (this speeds up things). Anyway, O_NOATIME (only for root/owner) seems a useful feature. -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 17:14:47 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0ABA10656DF; Fri, 31 Oct 2008 17:14:47 +0000 (UTC) (envelope-from thierry.herbelot@free.fr) Received: from postfix1-g20.free.fr (postfix1-g20.free.fr [212.27.60.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8425F8FC16; Fri, 31 Oct 2008 17:14:47 +0000 (UTC) (envelope-from thierry.herbelot@free.fr) Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29]) by postfix1-g20.free.fr (Postfix) with ESMTP id 90C272D4BDF3; Fri, 31 Oct 2008 17:46:34 +0100 (CET) Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id 8755817B58B; Fri, 31 Oct 2008 17:46:32 +0100 (CET) Received: from mail.herbelot.nom (bne75-4-82-227-159-103.fbx.proxad.net [82.227.159.103]) by smtp3-g19.free.fr (Postfix) with ESMTP id 488FE17B546; Fri, 31 Oct 2008 17:46:32 +0100 (CET) Received: from diversion.herbelot.nom (diversion.herbelot.nom [192.168.2.6]) by mail.herbelot.nom (8.14.1/8.14.1) with ESMTP id m9VGkUjD019620; Fri, 31 Oct 2008 17:46:31 +0100 (CET) From: Thierry Herbelot To: hackers@freebsd.org Date: Fri, 31 Oct 2008 17:46:23 +0100 User-Agent: KMail/1.9.10 X-Warning: Windows can lose your files X-Op-Sys: Le FriBi de la mort qui tue X-Org: TfH&Co X-MailScanner: Found to be clean MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810311746.23743.thierry.herbelot@free.fr> X-Mailman-Approved-At: Fri, 31 Oct 2008 17:27:52 +0000 Cc: current ML Subject: strange behaviour with /sbin/init and serial console X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: thierry.herbelot@free.fr List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 17:14:48 -0000 Hello, with the following patch on /sbin/init, I have two different behaviours depending on the console type (on a i386/32 PC) : - on a video console, I see the expected two messages, - on a serial console, the messages are not displayed (init silently finishes its job and gets to start /etc/rc and everything) I assume that the writev system call is implemented in src/sys/kern/tty_cons.c::cnwrite(), but I could not parse the code to find an explanation. any taker ? TfH PS : this is initially for a RELENG_6 machine, but the code is quite similar under RELENG_7 or Current --- usr/src/sbin/init/init.c.ori 2008-10-31 14:20:48.294794898 +0100 +++ usr/src/sbin/init/init.c 2008-10-31 14:12:16.168062031 +0100 @@ -44,6 +44,8 @@ "$FreeBSD: src/sbin/init/init.c,v 1.60.2.2 2006/07/08 15:34:27 kib Exp $"; #endif /* not lint */ +#include + #include #include #include @@ -239,6 +241,23 @@ */ openlog("init", LOG_CONS|LOG_ODELAY, LOG_AUTH); + warning("warning after openlog"); +{ +int fd; + if ((fd = open("/dev/console", O_WRONLY|O_NONBLOCK, 0)) >= 0) { + struct iovec iov[2]; + struct iovec *v = iov; + + v->iov_base = (void *)"iov direct write test"; + v->iov_len = 21; + ++v; + v->iov_base = (void *)"\r\n"; + v->iov_len = 2; + (void)writev(fd, iov, 2); + (void)close(fd); + } + +} /* * Create an initial session. */ From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 17:32:50 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 124BB106564A for ; Fri, 31 Oct 2008 17:32:50 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id CCC308FC1A for ; Fri, 31 Oct 2008 17:32:49 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m9VHWn627347; Fri, 31 Oct 2008 10:32:49 -0700 (PDT) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m9VHWmA19123; Fri, 31 Oct 2008 10:32:49 -0700 (PDT) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Fri, 31 Oct 2008 10:32:47 -0700 (PDT) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Andriy Gapon In-Reply-To: <490B05BA.9090306@icyb.net.ua> Message-ID: References: <4909DC03.1080901@icyb.net.ua> <20081030184625.GA99398@server.vk2pj.dyndns.org> <490B05BA.9090306@icyb.net.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: memtest86+ can not link: binutils issue? 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, 31 Oct 2008 17:32:50 -0000 On Fri, 31 Oct 2008, Andriy Gapon wrote: > on 30/10/2008 20:46 Peter Jeremy said the following: >> On 2008-Oct-30 18:08:35 +0200, Andriy Gapon wrote: >>> ld --warn-constructors --warn-common -static -T memtest_shared.lds \ >>> -o memtest_shared head.o reloc.o main.o test.o init.o lib.o >>> patn.o screen_buffer.o config.o linuxbios.o memsize.o pci.o controller.o >>> random.o extra.o spd.o error.o dmi.o && \ >>> ld -shared -Bsymbolic -T memtest_shared.lds -o memtest_shared >>> head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o >>> config.o linuxbios.o memsize.o pci.o controller.o random.o extra.o spd.o >>> error.o dmi.o >>> head.o(.text+0x7): In function `startup_32': >>> : undefined reference to `_GLOBAL_OFFSET_TABLE_' >>> Segmentation fault (core dumped) >>> gmake: *** [memtest_shared] Error 139 >> >> I can't help here. _GLOBAL_OFFSET_TABLE_ is related to the binutils >> PIC support and it appears that the linker doesn't like the code (in >> head.S) is explicitly referencing it. >> >>> Not only linking fails, but ld even crashes. >> >> I agree this shouldn't happen. >> >>> Can anybody suggest anything about this problem? >> >> It looks like stand-alone PIC code on FreeBSD needs some different >> incantations to Linux. My understanding is that several of the >> i386 bootstraps are relocatable so you might like to peruse the >> code in /usr/src/sys/boot/i386 for ideas. > > I wonder if this is something about out port of binutils or is it an > issue in older version of binutils. > I'll try to look at the boot code, thank you for the hint. FreeBSD's version of binutils is quite old. I've definitely found bugs in it which are fixed in GNU's current version. So you might try building the official GNU binutils and see if that works any better. I don't know if it will fix your error but maybe it at least won't crash. ld crashing is definitely a bug, and it would be nice if you could file a PR, including the object files. If the GNU version doesn't crash that would be useful information for the PR also, as it might encourage Them to consider importing a newer version. -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 17:42:40 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9090B1065670 for ; Fri, 31 Oct 2008 17:42:40 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA07.westchester.pa.mail.comcast.net (qmta07.westchester.pa.mail.comcast.net [76.96.62.64]) by mx1.freebsd.org (Postfix) with ESMTP id 29E908FC08 for ; Fri, 31 Oct 2008 17:42:40 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA04.westchester.pa.mail.comcast.net ([76.96.62.35]) by QMTA07.westchester.pa.mail.comcast.net with comcast id ZTWE1a0070ldTLk57VY7TK; Fri, 31 Oct 2008 17:32:07 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA04.westchester.pa.mail.comcast.net with comcast id ZVYQ1a00M2P6wsM3QVYRWV; Fri, 31 Oct 2008 17:32:25 +0000 X-Authority-Analysis: v=1.0 c=1 a=PY5qRhY-vE0A:10 a=kLzTVIZtAFQA:10 a=6I5d2MoRAAAA:8 a=QycZ5dHgAAAA:8 a=t9vrcsja805Kzm4Pb0IA:9 a=KPpXJQ_P1kAnmngCeRgA:7 a=667Tt2HpYEUriwnNuWoX7X-6QcsA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 69715C9419; Fri, 31 Oct 2008 10:32:24 -0700 (PDT) Date: Fri, 31 Oct 2008 10:32:24 -0700 From: Jeremy Chadwick To: Thierry Herbelot Message-ID: <20081031173224.GA37636@icarus.home.lan> References: <200810311746.23743.thierry.herbelot@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200810311746.23743.thierry.herbelot@free.fr> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: hackers@freebsd.org, current ML Subject: Re: strange behaviour with /sbin/init and serial console 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, 31 Oct 2008 17:42:40 -0000 On Fri, Oct 31, 2008 at 05:46:23PM +0100, Thierry Herbelot wrote: > with the following patch on /sbin/init, I have two different behaviours > depending on the console type (on a i386/32 PC) : > - on a video console, I see the expected two messages, > - on a serial console, the messages are not displayed (init silently finishes > its job and gets to start /etc/rc and everything) I thought this was normal behaviour on FreeBSD, but it's very likely I'm misunderstanding. The charts in Section 27.6.4 describe what "level" of logging is shown where and at what stage, depending upon which boot flags and device settings you use: http://www.freebsd.org/doc/en/books/handbook/serialconsole-setup.html -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 17:47:41 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 811FA106564A for ; Fri, 31 Oct 2008 17:47:41 +0000 (UTC) (envelope-from thierry.herbelot@laposte.net) Received: from smtp8-g19.free.fr (smtp8-g19.free.fr [212.27.42.65]) by mx1.freebsd.org (Postfix) with ESMTP id 3F0E08FC18 for ; Fri, 31 Oct 2008 17:47:41 +0000 (UTC) (envelope-from thierry.herbelot@laposte.net) Received: from smtp8-g19.free.fr (localhost [127.0.0.1]) by smtp8-g19.free.fr (Postfix) with ESMTP id 1224632AA42; Fri, 31 Oct 2008 18:47:40 +0100 (CET) Received: from mail.herbelot.nom (bne75-4-82-227-159-103.fbx.proxad.net [82.227.159.103]) by smtp8-g19.free.fr (Postfix) with ESMTP id CA1B332A997; Fri, 31 Oct 2008 18:47:39 +0100 (CET) Received: from diversion.herbelot.nom (diversion.herbelot.nom [192.168.2.6]) by mail.herbelot.nom (8.14.1/8.14.1) with ESMTP id m9VHlcj0020061; Fri, 31 Oct 2008 18:47:38 +0100 (CET) From: Thierry Herbelot To: Jeremy Chadwick Date: Fri, 31 Oct 2008 18:47:31 +0100 User-Agent: KMail/1.9.10 References: <200810311746.23743.thierry.herbelot@free.fr> <20081031173224.GA37636@icarus.home.lan> In-Reply-To: <20081031173224.GA37636@icarus.home.lan> X-Warning: Windows can lose your files X-Op-Sys: Le FriBi de la mort qui tue X-Org: TfH&Co X-MailScanner: Found to be clean MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200810311847.31723.thierry.herbelot@laposte.net> Cc: hackers@freebsd.org, current ML Subject: Re: strange behaviour with /sbin/init and serial console 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, 31 Oct 2008 17:47:41 -0000 Le Friday 31 October 2008, Jeremy Chadwick a écrit : > On Fri, Oct 31, 2008 at 05:46:23PM +0100, Thierry Herbelot wrote: > > with the following patch on /sbin/init, I have two different behaviours > > depending on the console type (on a i386/32 PC) : > > - on a video console, I see the expected two messages, > > - on a serial console, the messages are not displayed (init silently > > finishes its job and gets to start /etc/rc and everything) > > I thought this was normal behaviour on FreeBSD, but it's very likely I'm > misunderstanding. The charts in Section 27.6.4 describe what "level" of > logging is shown where and at what stage, depending upon which boot > flags and device settings you use: > > http://www.freebsd.org/doc/en/books/handbook/serialconsole-setup.html Hello, I had not taken the time to read this link as thouroughly as should have been. nevertheless, I think the config is right, as the serial console is selected with "-h" in /boot.config (from memory, the machine is at work ...) and all *other* expected messages from the kernel ("dmesg") and the rc scripts are correctly displayed on respectively the serial and video console. what struck me is that, from all the startup messages, just the messages from /sbin/init are displayed only on the video console TfH From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 17:59:28 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C286A1065674 for ; Fri, 31 Oct 2008 17:59:28 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 67FB38FC1B for ; Fri, 31 Oct 2008 17:59:28 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 9688C28454 for ; Sat, 1 Nov 2008 01:59:27 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 07898EBA4BD; Sat, 1 Nov 2008 01:59:27 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id PsSqY49fuWKv; Sat, 1 Nov 2008 01:59:22 +0800 (CST) Received: from charlie.delphij.net (adsl-76-237-33-62.dsl.pltn13.sbcglobal.net [76.237.33.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id F2D51EBA4B4; Sat, 1 Nov 2008 01:59:19 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:subject:references:in-reply-to:x-enigmail-version:openpgp: content-type:content-transfer-encoding; b=E58wcHwkQGvUIkofs/ld6gmLdDPG2b7cELaF0q5Ijt1t8MYzwI05CP/STac/pGdyS mvIcqvrxLMxZ7bTkTtYAw== Message-ID: <490B4771.9040709@delphij.net> Date: Fri, 31 Oct 2008 10:59:13 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.17 (X11/20080928) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <20081030154711.GA8416@icarus.home.lan> <490A6A8A.7080504@delphij.net> <20081031024748.GA20319@icarus.home.lan> <20081031134842.GA15218@psconsult.nl> In-Reply-To: <20081031134842.GA15218@psconsult.nl> X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: open(2) and O_NOATIME X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 17:59:28 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Paul Schenkeveld wrote: [...] > utimes(2) allows non-root users to (re)set atime provided they own the > file or have write permission. Having O_NOATIME follow the same rules > would not break any assumed security any further than utimes(2) already > does but greatfully benefit all kind of backup programs. Yes this makes sense I think. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkLR3AACgkQi+vbBBjt66BPhACfcZf6JcH0RmTpbpZHVXjdrJTq f7oAoLqQwb2UkFGrDDTy7//Ril2JWmA4 =y1zY -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 18:23:54 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB7C61065689 for ; Fri, 31 Oct 2008 18:23:54 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.177]) by mx1.freebsd.org (Postfix) with ESMTP id 802CA8FC0C for ; Fri, 31 Oct 2008 18:23:54 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: by el-out-1112.google.com with SMTP id v27so756889ele.13 for ; Fri, 31 Oct 2008 11:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition:x-google-sender-auth; bh=hoUeaLqI+5K2p/Mxs4+zqau/uK7KbXUKTQ+ekWc9/u0=; b=CbEI5/W1gO8L8y8p6yLmzI+1yYemxv4e8TQF486zkvIthbXpfYudmsa56gEW+u9+nm ItYYgm3gUGwB9ZbmVQmFUA8U2EteICJW9W7RKbeTT19YWW8zXHwb+sA6QhP3Tu7IvoLH kS/8sHFk3y9EL9IMV068l/SVAI4LrZtD/YA7c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:mime-version :content-type:content-transfer-encoding:content-disposition :x-google-sender-auth; b=S6YmGFVI8JzNwXFzwmEhrfXgOJQiuIIfL3Q7jOD4Lr2UJjvaCUgNmN2VjSMlDtR/bS U56fludS/8pnoAftxq3PJ/PjANg0DitC7G83LheLH7+1hKJiaBplpsqxBTegInzLYDrW yGEJPlnbQ6W5+Y+VCMHdTcumlIC5E6Q5MOR44= Received: by 10.142.125.9 with SMTP id x9mr4882313wfc.66.1225477433218; Fri, 31 Oct 2008 11:23:53 -0700 (PDT) Received: by 10.142.141.5 with HTTP; Fri, 31 Oct 2008 11:23:53 -0700 (PDT) Message-ID: <539c60b90810311123w2aa94b8akcd0a5d0fe791885a@mail.gmail.com> Date: Fri, 31 Oct 2008 11:23:53 -0700 From: "Steve Franks" Sender: bahamasfranks@gmail.com To: freebsd-hackers MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 1209a4ef8afa6114 Subject: includes, configure, /usr/lib vs. /usr/local/lib, and linux coders X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: stevefranks@ieee.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 18:23:54 -0000 I believe someone has told me on this list that the proper way to compile a linux program is to run configure --includedir=/usr/local/include --libdir=/usr/local/lib. Is that correct? I've got a bunch of linux weenies trying to tell me their code isn't broken because I'm supposed to have headers where theirs are. They state that includedir is used by *their* project to locate it's *own* headers, so they never bothered to wire it up in Makefile.in....it gets ignored entirely. I figured I'd better know what I'm talking about before I tell someone they are 'wrong'. Especially as it's usually me ;) Steve From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 19:06:15 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C7C81065692; Fri, 31 Oct 2008 19:06:15 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (unknown [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id DF4CE8FC13; Fri, 31 Oct 2008 19:06:14 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 09DBF1CCB2; Fri, 31 Oct 2008 20:06:14 +0100 (CET) Date: Fri, 31 Oct 2008 20:06:14 +0100 From: Ed Schouten To: Thierry Herbelot Message-ID: <20081031190614.GQ1165@hoeg.nl> References: <200810311746.23743.thierry.herbelot@free.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zsAhXfiBV62A5hVr" Content-Disposition: inline In-Reply-To: <200810311746.23743.thierry.herbelot@free.fr> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: hackers@freebsd.org, current ML Subject: Re: strange behaviour with /sbin/init and serial console 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, 31 Oct 2008 19:06:15 -0000 --zsAhXfiBV62A5hVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Theirry, * Thierry Herbelot wrote: > with the following patch on /sbin/init, I have two different behaviours= =20 > depending on the console type (on a i386/32 PC) : > - on a video console, I see the expected two messages, > - on a serial console, the messages are not displayed (init silently fini= shes=20 > its job and gets to start /etc/rc and everything) >=20 > I assume that the writev system call is implemented in=20 > src/sys/kern/tty_cons.c::cnwrite(), but I could not parse the code to fin= d an=20 > explanation. >=20 > any taker ? >=20 > TfH >=20 > PS : this is initially for a RELENG_6 machine, but the code is quite simi= lar=20 > under RELENG_7 or Current Any data written to /dev/console is not multiplexed to all console devices, but only the first active device in the list. The reason behind this, is because it adds a real lot of complexity to the console code, especially related to polling and reading on /dev/console. This weekend I'm going to commit a replacement implementation of /dev/console, which also has this restriction. --=20 Ed Schouten WWW: http://80386.nl/ --zsAhXfiBV62A5hVr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkLVyUACgkQ52SDGA2eCwXJRQCfYlP8lwi/+EZ/nUcM/2blOMzk AxgAn2b3VAVoExfOqCogJOtJxJ/SoWic =d94R -----END PGP SIGNATURE----- --zsAhXfiBV62A5hVr-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 19:30:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED6A9106564A for ; Fri, 31 Oct 2008 19:30:47 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by mx1.freebsd.org (Postfix) with ESMTP id 9D71B8FC0C for ; Fri, 31 Oct 2008 19:30:47 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so589938yxb.13 for ; Fri, 31 Oct 2008 12:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=Fl5j9ODUmySQcNuC6TwDdVB4MBilZAjusdQEQa4VFJM=; b=iMHcmMK4LArIjKG/wr42ONggR9pZ6+KSSwTZuhoL8Qa5wIyTppoSnNPJoglRO/tG9F hPfTz6APBGhkS0dQNk3NABoo6o6zj2s31wHH3eANy1Kiq29KQQwxwg7MLFPrVKaDSWZO G8tRXjjKxBC1SuCUoxcyGmz+R6V4UhoanyHAw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=QRC0rOsyRGugDqYXHoHrArgyWBBVs84ETQ0HBzeVmyuWsUHuazOuk7kkH4q/FiqKQb 6hzZU9JxdHIg/3qtCn5a6zI9xa0tx128grGupghLjP4XQdxLLrVvaPEn0ThD9UReDaU1 zj25g1K6HfNWQK6S59nTPmcSd7ceWBLiYgtBc= Received: by 10.142.70.16 with SMTP id s16mr5593858wfa.120.1225481446494; Fri, 31 Oct 2008 12:30:46 -0700 (PDT) Received: by 10.142.141.5 with HTTP; Fri, 31 Oct 2008 12:30:46 -0700 (PDT) Message-ID: <539c60b90810311230i11460966la7ff35b0093642ec@mail.gmail.com> Date: Fri, 31 Oct 2008 12:30:46 -0700 From: "Steve Franks" Sender: bahamasfranks@gmail.com To: "Nate Eldredge" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <539c60b90810311123w2aa94b8akcd0a5d0fe791885a@mail.gmail.com> X-Google-Sender-Auth: 67c634b05763899b Cc: freebsd-hackers Subject: Re: includes, configure, /usr/lib vs. /usr/local/lib, and linux coders X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: stevefranks@ieee.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 19:30:48 -0000 On Fri, Oct 31, 2008 at 12:11 PM, Nate Eldredge wrote: > On Fri, 31 Oct 2008, Steve Franks wrote: > >> I believe someone has told me on this list that the proper way to >> compile a linux program is to run configure >> --includedir=/usr/local/include --libdir=/usr/local/lib. > > Nitpick: not specifically a Linux program, but a program using a configure > script generated by GNU's autoconf system. Programs using autoconf may > run on systems other than Linux (usually do, in fact, since the point of > autoconf is portability), and many Linux programs don't use autoconf. > > And I'll assume that by 'linux' you actually mean FreeBSD, in order for this > to be on-topic for this list :) > >> Is that >> correct? I've got a bunch of linux weenies trying to tell me their >> code isn't broken because I'm supposed to have headers where theirs >> are. > > I don't understand this sentence. > >> They state that includedir is used by *their* project to locate >> it's *own* headers, so they never bothered to wire it up in >> Makefile.in....it gets ignored entirely. >> >> I figured I'd better know what I'm talking about before I tell someone >> they are 'wrong'. Especially as it's usually me ;) > > It looks to me like both of you are wrong. :) Looking at the configure that > comes with wget-1.11.2, running configure --help says > > Fine tuning of the installation directories: > ... > --libdir=DIR object code libraries [EPREFIX/lib] > --includedir=DIR C header files [PREFIX/include] > > So it looks like --libdir is supposed to specify where libraries are to be > *installed*, not where they are to be searched for. > > Further up in the help we have > > --prefix=PREFIX install architecture-independent files in PREFIX > [/usr/local] > --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX > [PREFIX] > > So libraries would already be installed in /usr/local/lib by default, unless > you used a --prefix or --exec-prefix option to override that. Similarly for > include files. > > If you need the program being built to search for libraries or include files > in a certain place (such as /usr/local/include and /usr/local/lib, which are > not searched by default on FreeBSD), AFAIK the right way to do it is to set > the LIBRARY_PATH and C_INCLUDE_PATH (or CPLUS_INCLUDE_PATH) environment > variables. > > -- > > Nate Eldredge > neldredge@math.ucsd.edu > Let's backup. What's the 'right' way to get a bloody linux program that expects all it's headers in /usr/include to compile on freebsd where all the headers are in /usr/local/include? That's all I'm really asking. Specifically, it's looking for libusb & libftdi. If I just type gmake, it can't find it, but if I manually edit the Makefiles to add -I/usr/local/include, it can. Obviously, manually editing the makefiles is *not* the right way to fix it (plus it's driving me crazy). Steve Steve From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 19:41:30 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD7CC1065692 for ; Fri, 31 Oct 2008 19:41:30 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail11.syd.optusnet.com.au (mail11.syd.optusnet.com.au [211.29.132.192]) by mx1.freebsd.org (Postfix) with ESMTP id 621938FC39 for ; Fri, 31 Oct 2008 19:41:30 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c122-106-215-175.belrs3.nsw.optusnet.com.au [122.106.215.175]) by mail11.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m9VJfRtT019395 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 1 Nov 2008 06:41:28 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id m9VJfRWe054107; Sat, 1 Nov 2008 06:41:27 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id m9VJfRNb054106; Sat, 1 Nov 2008 06:41:27 +1100 (EST) (envelope-from peter) Date: Sat, 1 Nov 2008 06:41:27 +1100 From: Peter Jeremy To: Steve Franks Message-ID: <20081031194127.GD99398@server.vk2pj.dyndns.org> References: <539c60b90810311123w2aa94b8akcd0a5d0fe791885a@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UPT3ojh+0CqEDtpF" Content-Disposition: inline In-Reply-To: <539c60b90810311123w2aa94b8akcd0a5d0fe791885a@mail.gmail.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers Subject: Re: includes, configure, /usr/lib vs. /usr/local/lib, and linux coders 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, 31 Oct 2008 19:41:30 -0000 --UPT3ojh+0CqEDtpF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2008-Oct-31 11:23:53 -0700, Steve Franks wrote: >I believe someone has told me on this list that the proper way to >compile a linux program is to run configure >--includedir=3D/usr/local/include --libdir=3D/usr/local/lib. Is that >correct? Yes. The FreeBSD toolchain does not automatically include /usr/local/... though the Linux one does. > I've got a bunch of linux weenies trying to tell me their >code isn't broken because I'm supposed to have headers where theirs >are. A very blinkered PoV... There are a whole pile of reasons why you might use/want a different layout. > They state that includedir is used by *their* project to locate >it's *own* headers, so they never bothered to wire it up in >Makefile.in....it gets ignored entirely. Then their project is broken. These options are intended for use by someone who is building the project. They are not for use by the project itself. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --UPT3ojh+0CqEDtpF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkLX2cACgkQ/opHv/APuIfrlwCeID7Fp9u6BJthi9RERWE6Fki+ xU0An3s+3W+ZsEHpIusuPCJvAv2hHaav =KQnZ -----END PGP SIGNATURE----- --UPT3ojh+0CqEDtpF-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 19:46:42 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B15F106568A for ; Fri, 31 Oct 2008 19:46:42 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id 2B6388FC17 for ; Fri, 31 Oct 2008 19:46:42 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m9VJkd617934; Fri, 31 Oct 2008 12:46:39 -0700 (PDT) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m9VJkdf19897; Fri, 31 Oct 2008 12:46:39 -0700 (PDT) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Fri, 31 Oct 2008 12:46:39 -0700 (PDT) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Steve Franks In-Reply-To: <539c60b90810311230i11460966la7ff35b0093642ec@mail.gmail.com> Message-ID: References: <539c60b90810311123w2aa94b8akcd0a5d0fe791885a@mail.gmail.com> <539c60b90810311230i11460966la7ff35b0093642ec@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers Subject: Re: includes, configure, /usr/lib vs. /usr/local/lib, and linux coders 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, 31 Oct 2008 19:46:42 -0000 On Fri, 31 Oct 2008, Steve Franks wrote: > Let's backup. What's the 'right' way to get a bloody linux program > that expects all it's headers in /usr/include to compile on freebsd > where all the headers are in /usr/local/include? That's all I'm > really asking. Specifically, it's looking for libusb & libftdi. If I > just type gmake, it can't find it, but if I manually edit the > Makefiles to add -I/usr/local/include, it can. Obviously, manually > editing the makefiles is *not* the right way to fix it (plus it's > driving me crazy). C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/include LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib export C_INCLUDE_PATH LIBRARY_PATH ./configure gmake Adjust as appropriate if using csh. Personally, I set those environment variables in my .profile. By the way, I think you're being a little unfair to blame this on Linux programs or programmers. Normally it's the user's responsibility to ensure that their compiler searches for include files, etc, in the appropriate place. Many Linux distributions put everything in /usr/include, which is searched by default. FreeBSD puts stuff from ports in /usr/local/include which isn't searched by default. I find that behavior inconvenient, which is why I set those environment variables, so I don't have to think about it. -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 19:56:34 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DED341065673; Fri, 31 Oct 2008 19:56:34 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (unknown [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 6EF078FC12; Fri, 31 Oct 2008 19:56:34 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id D09471CCB2; Fri, 31 Oct 2008 20:56:32 +0100 (CET) Date: Fri, 31 Oct 2008 20:56:32 +0100 From: Ed Schouten To: Scott Long Message-ID: <20081031195632.GR1165@hoeg.nl> References: <200810311746.23743.thierry.herbelot@free.fr> <20081031190614.GQ1165@hoeg.nl> <490B5C42.10200@samsco.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bAwSoJxbKYwy34Oe" Content-Disposition: inline In-Reply-To: <490B5C42.10200@samsco.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Thierry Herbelot , hackers@freebsd.org, current ML Subject: Re: strange behaviour with /sbin/init and serial console 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, 31 Oct 2008 19:56:35 -0000 --bAwSoJxbKYwy34Oe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Scott Long wrote: > The multiplexed console feature is one thing that linux got right. In a > corporate setting, you really need both a serial console and a video > console in order to effectively manage the machines, as you want to be > able to access them both remotely and locally. While it might be hard > to build multiplexing into the console driver, do you think it would be > possible to layer a multiplexer on top of it, similar to how the kbdmux > driver works? I'm not sure at which level we should implement this. I mainly wrote the new /dev/console implementation, because it is a lot more simple than the existing one and removes ugly hacks from the TTY code (like recursive locking, etc). Maybe if I can find some more time I'll look into it more closely, but my todo list is very long right now. ;-) --=20 Ed Schouten WWW: http://80386.nl/ --bAwSoJxbKYwy34Oe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkLYvAACgkQ52SDGA2eCwWvvACZAfYAV/IvOOGWyY6j+9vcm0vB CiwAn1rLoPAAIUKQi5/pKTZZQwYY2S/4 =BFJv -----END PGP SIGNATURE----- --bAwSoJxbKYwy34Oe-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 19:42:55 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF0751065687 for ; Fri, 31 Oct 2008 19:42:55 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 85E058FC3D for ; Fri, 31 Oct 2008 19:42:55 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id m9VJS2KY093225; Fri, 31 Oct 2008 13:28:03 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <490B5C42.10200@samsco.org> Date: Fri, 31 Oct 2008 13:28:02 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Ed Schouten References: <200810311746.23743.thierry.herbelot@free.fr> <20081031190614.GQ1165@hoeg.nl> In-Reply-To: <20081031190614.GQ1165@hoeg.nl> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org X-Mailman-Approved-At: Fri, 31 Oct 2008 20:20:05 +0000 Cc: Thierry Herbelot , hackers@freebsd.org, current ML Subject: Re: strange behaviour with /sbin/init and serial console 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, 31 Oct 2008 19:42:55 -0000 Ed Schouten wrote: > Hello Theirry, > > * Thierry Herbelot wrote: >> with the following patch on /sbin/init, I have two different behaviours >> depending on the console type (on a i386/32 PC) : >> - on a video console, I see the expected two messages, >> - on a serial console, the messages are not displayed (init silently finishes >> its job and gets to start /etc/rc and everything) >> >> I assume that the writev system call is implemented in >> src/sys/kern/tty_cons.c::cnwrite(), but I could not parse the code to find an >> explanation. >> >> any taker ? >> >> TfH >> >> PS : this is initially for a RELENG_6 machine, but the code is quite similar >> under RELENG_7 or Current > > Any data written to /dev/console is not multiplexed to all console > devices, but only the first active device in the list. The reason behind > this, is because it adds a real lot of complexity to the console code, > especially related to polling and reading on /dev/console. > > This weekend I'm going to commit a replacement implementation of > /dev/console, which also has this restriction. > The multiplexed console feature is one thing that linux got right. In a corporate setting, you really need both a serial console and a video console in order to effectively manage the machines, as you want to be able to access them both remotely and locally. While it might be hard to build multiplexing into the console driver, do you think it would be possible to layer a multiplexer on top of it, similar to how the kbdmux driver works? Scott From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 20:21:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B34B71065678 for ; Fri, 31 Oct 2008 20:21:47 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 501118FC08 for ; Fri, 31 Oct 2008 20:21:47 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id m9VKLjLB001424; Fri, 31 Oct 2008 16:21:46 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Fri, 31 Oct 2008 16:21:46 -0400 (EDT) Date: Fri, 31 Oct 2008 16:21:45 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Nate Eldredge In-Reply-To: Message-ID: References: <539c60b90810311123w2aa94b8akcd0a5d0fe791885a@mail.gmail.com> <539c60b90810311230i11460966la7ff35b0093642ec@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers , Steve Franks Subject: Re: includes, configure, /usr/lib vs. /usr/local/lib, and linux coders X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 20:21:47 -0000 On Fri, 31 Oct 2008, Nate Eldredge wrote: > On Fri, 31 Oct 2008, Steve Franks wrote: > >> Let's backup. What's the 'right' way to get a bloody linux program >> that expects all it's headers in /usr/include to compile on freebsd >> where all the headers are in /usr/local/include? That's all I'm >> really asking. Specifically, it's looking for libusb & libftdi. If I >> just type gmake, it can't find it, but if I manually edit the >> Makefiles to add -I/usr/local/include, it can. Obviously, manually >> editing the makefiles is *not* the right way to fix it (plus it's >> driving me crazy). > > C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/include > LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib > export C_INCLUDE_PATH LIBRARY_PATH > ./configure > gmake > > Adjust as appropriate if using csh. > > Personally, I set those environment variables in my .profile. > > By the way, I think you're being a little unfair to blame this on Linux > programs or programmers. Normally it's the user's responsibility to ensure > that their compiler searches for include files, etc, in the appropriate > place. Many Linux distributions put everything in /usr/include, which is > searched by default. FreeBSD puts stuff from ports in /usr/local/include > which isn't searched by default. I find that behavior inconvenient, which is > why I set those environment variables, so I don't have to think about it. I don't really care who's to blame (I'd guess I'd blame both the Linux distros and the Linux application developers), but the move to put everything in /usr/include and /usr/lib annoys the heck out of me. It blurs the line between the base OS and installed 3rd party software. Perhaps that's because Linux is really just a kernel, and to the distributors - most, if not all, of their software is 3rd-party. It's really nice to be able to install 3rd-party software so that it doesn't affect the base OS. On FreeBSD, it's easy enough just to 'rm -rf /usr/local' and start fresh without having to worry about screwing up the base OS. -- DE From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 20:32:25 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A444C1065678 for ; Fri, 31 Oct 2008 20:32:25 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from mailrelay005.isp.belgacom.be (mailrelay005.isp.belgacom.be [195.238.6.171]) by mx1.freebsd.org (Postfix) with ESMTP id 4000E8FC23 for ; Fri, 31 Oct 2008 20:32:24 +0000 (UTC) (envelope-from tijl@ulyssis.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsAEAM//CklR9cmm/2dsb2JhbACBdsxbg1E Received: from 166.201-245-81.adsl-dyn.isp.belgacom.be (HELO kalimero.kotnet.org) ([81.245.201.166]) by relay.skynet.be with ESMTP; 31 Oct 2008 21:03:54 +0100 Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.14.3/8.14.3) with ESMTP id m9VK1NiE008708; Fri, 31 Oct 2008 21:01:23 +0100 (CET) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-hackers@freebsd.org, stevefranks@ieee.org Date: Fri, 31 Oct 2008 21:01:21 +0100 User-Agent: KMail/1.9.10 References: <539c60b90810311123w2aa94b8akcd0a5d0fe791885a@mail.gmail.com> <539c60b90810311230i11460966la7ff35b0093642ec@mail.gmail.com> In-Reply-To: <539c60b90810311230i11460966la7ff35b0093642ec@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810312101.22605.tijl@ulyssis.org> Cc: Subject: Re: includes, configure, /usr/lib vs. /usr/local/lib, and linux coders 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, 31 Oct 2008 20:32:25 -0000 On Friday 31 October 2008 20:30:46 Steve Franks wrote: > Let's backup. What's the 'right' way to get a bloody linux program > that expects all it's headers in /usr/include to compile on freebsd > where all the headers are in /usr/local/include? That's all I'm > really asking. Specifically, it's looking for libusb & libftdi. If > I just type gmake, it can't find it, but if I manually edit the > Makefiles to add -I/usr/local/include, it can. Obviously, manually > editing the makefiles is *not* the right way to fix it (plus it's > driving me crazy). ./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" They should consider using pkg-config in their configure script to locate libusb and libftdi. From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 21:09:07 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 504BE1065673 for ; Fri, 31 Oct 2008 21:09:07 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA09.emeryville.ca.mail.comcast.net (qmta09.emeryville.ca.mail.comcast.net [76.96.30.96]) by mx1.freebsd.org (Postfix) with ESMTP id 355838FC1B for ; Fri, 31 Oct 2008 21:09:07 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA03.emeryville.ca.mail.comcast.net ([76.96.30.27]) by QMTA09.emeryville.ca.mail.comcast.net with comcast id ZVhj1a0070b6N64A9Yt7Z5; Fri, 31 Oct 2008 20:53:07 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA03.emeryville.ca.mail.comcast.net with comcast id ZYt61a0032P6wsM8PYt6e3; Fri, 31 Oct 2008 20:53:07 +0000 X-Authority-Analysis: v=1.0 c=1 a=PY5qRhY-vE0A:10 a=kLzTVIZtAFQA:10 a=QycZ5dHgAAAA:8 a=_0snWaezkuZAxO3qcZMA:9 a=cTXnQ0Xl32sj3gjX_eYA:7 a=7ov2EYgUsnRZfohZlXz-TEGkpmwA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id D51DDC9419; Fri, 31 Oct 2008 13:53:05 -0700 (PDT) Date: Fri, 31 Oct 2008 13:53:05 -0700 From: Jeremy Chadwick To: Scott Long Message-ID: <20081031205305.GA41320@icarus.home.lan> References: <200810311746.23743.thierry.herbelot@free.fr> <20081031190614.GQ1165@hoeg.nl> <490B5C42.10200@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <490B5C42.10200@samsco.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Thierry Herbelot , Ed Schouten , hackers@freebsd.org, current ML Subject: Re: strange behaviour with /sbin/init and serial console 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, 31 Oct 2008 21:09:07 -0000 On Fri, Oct 31, 2008 at 01:28:02PM -0600, Scott Long wrote: > Ed Schouten wrote: >> Hello Theirry, >> >> * Thierry Herbelot wrote: >>> with the following patch on /sbin/init, I have two different >>> behaviours depending on the console type (on a i386/32 PC) : >>> - on a video console, I see the expected two messages, >>> - on a serial console, the messages are not displayed (init silently >>> finishes its job and gets to start /etc/rc and everything) >>> >>> I assume that the writev system call is implemented in >>> src/sys/kern/tty_cons.c::cnwrite(), but I could not parse the code to >>> find an explanation. >>> >>> any taker ? >>> >>> TfH >>> >>> PS : this is initially for a RELENG_6 machine, but the code is quite >>> similar under RELENG_7 or Current >> >> Any data written to /dev/console is not multiplexed to all console >> devices, but only the first active device in the list. The reason behind >> this, is because it adds a real lot of complexity to the console code, >> especially related to polling and reading on /dev/console. >> >> This weekend I'm going to commit a replacement implementation of >> /dev/console, which also has this restriction. >> > > The multiplexed console feature is one thing that linux got right. In a > corporate setting, you really need both a serial console and a video > console in order to effectively manage the machines, as you want to be > able to access them both remotely and locally. I know this comment isn't much help, but, I am in full agreement with Scott. FreeBSD's lack of *true* multi (or even dual) console during all stages is a big disappointment to server administrators. The common reaction is: "What do you mean I can only get some messages on serial or some messages on VGA?! That's retarded!" I believe DragonFly has addressed this (offering a true dual console mechanism), and if I remember correctly, Matt Dillon discussed the code changes in great detail, citing a large amount of re-engineering required to accomplish it. > While it might be hard to build multiplexing into the console driver, > do you think it would be possible to layer a multiplexer on top of it, > similar to how the kbdmux driver works? Let's make sure that we don't implement it identically though, as there are many of us who have major problems with kbdmux (reports of LORs, and even more reports of incredibly slow keyboard input when a USB keyboard is used; workarounds are either disabling atkbd/atkbdc entirely, or disabling kbdmux entirely. In my case, I found the latter to be preferable). :-) -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 1 07:02:34 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8494B1065672 for ; Sat, 1 Nov 2008 07:02:34 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 2C51C8FC1A for ; Sat, 1 Nov 2008 07:02:34 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=gNzctWPk6lQzta5uqGFCHmjk6MGYuyLtCDsWtKJkhHH00/DNavzwP3yotksQ4tSEpVTgthOfp2CeoVhDO3EYtKaC5EIuaxlzuXpJQdeeJKkZfxyykJZaJp8RmOQQ091pQPMJLftTvUuarmfT19PFY2LJe+tlrUnT2PrYEsGgksw=; Received: from phoenix.codelabs.ru (ppp91-78-220-158.pppoe.mtu-net.ru [91.78.220.158]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1KwAVD-000F1A-To; Sat, 01 Nov 2008 10:02:32 +0300 Date: Sat, 1 Nov 2008 10:02:30 +0300 From: Eygene Ryabinkin To: Ed Schouten Message-ID: References: <20081028081154.GQ6808@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8NvZYKFJsRX2Djef" Content-Disposition: inline In-Reply-To: <20081028081154.GQ6808@hoeg.nl> Sender: rea-fbsd@codelabs.ru Cc: FreeBSD Hackers Subject: Re: [Testers wanted] /dev/console cleanups 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, 01 Nov 2008 07:02:34 -0000 --8NvZYKFJsRX2Djef Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ed, good day. Tue, Oct 28, 2008 at 09:11:54AM +0100, Ed Schouten wrote: > It's nice to hear that the patch didn't break anything on your system. I > hope to receive more reviews, but I think I'll just commit it this > weekend (with small modifications). Just a quick "me too" message: patchset from October, 29th works flawlessly on my systems. Thanks! --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual =20 )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook=20 {_.-``-' {_/ # --8NvZYKFJsRX2Djef Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkL/wYACgkQthUKNsbL7YjrlgCfanZc0kK2df+DFyL7vpfr8DMF o5oAnjsujJl86moK4dgkMEmcXyoQPXoJ =Pn0D -----END PGP SIGNATURE----- --8NvZYKFJsRX2Djef-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 1 16:13:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42F0F106564A for ; Sat, 1 Nov 2008 16:13:19 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id CBEE18FC0A for ; Sat, 1 Nov 2008 16:13:18 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl158-209.kln.forthnet.gr [62.1.61.209]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id mA1FtCHs010532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 1 Nov 2008 17:55:18 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id mA1FtBWB067379; Sat, 1 Nov 2008 17:55:11 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id mA1Ft9li067378; Sat, 1 Nov 2008 17:55:09 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: stevefranks@ieee.org References: <539c60b90810311123w2aa94b8akcd0a5d0fe791885a@mail.gmail.com> <539c60b90810311230i11460966la7ff35b0093642ec@mail.gmail.com> Date: Sat, 01 Nov 2008 17:55:08 +0200 In-Reply-To: <539c60b90810311230i11460966la7ff35b0093642ec@mail.gmail.com> (Steve Franks's message of "Fri, 31 Oct 2008 12:30:46 -0700") Message-ID: <87r65vl9ur.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: mA1FtCHs010532 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.998, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.40, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: Nate Eldredge , freebsd-hackers Subject: Re: includes, configure, /usr/lib vs. /usr/local/lib, and linux coders 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, 01 Nov 2008 16:13:19 -0000 On Fri, 31 Oct 2008 12:30:46 -0700, "Steve Franks" wrote: > Let's backup. What's the 'right' way to get a bloody linux program > that expects all it's headers in /usr/include to compile on freebsd > where all the headers are in /usr/local/include? That's all I'm > really asking. Specifically, it's looking for libusb & libftdi. If I > just type gmake, it can't find it, but if I manually edit the > Makefiles to add -I/usr/local/include, it can. Obviously, manually > editing the makefiles is *not* the right way to fix it (plus it's > driving me crazy). Then you run `configure' with the `right' environment: env CPPFLAGS='-I/usr/local/include' \ LDFLAGS='-L/usr/local/lib' ./configure The `--includedir' and `--libdir' options are *not* meant to be useful to the developer that uses the GNU build tools, but to the person who compiles something for the target host. There are several types of people involved in the `release' of a full program: * The maintainer, who uses `automake', `libtool' and `autoconf' to write portable Makefiles and build tools. * The builder, who compiles the program with specific options. * The packager, who runs `make install' in the build tree, creates a set of installed files, and then packages *some* of these files in a packaging-specific format. These types of people commonly have different constraints in the way they can tweak and twist the GNU build tools, to match their needs. 1. The _maintainer_ of the program is free to set up his environment to include any `CPPFLAGS', `CFLAGS' or `LDFLAGS' they find useful. For example, if they have an experimental third-party library installed in a custom location they can use: export CPPFLAGS='-I/opt/foolib/include' LDFLAGS='-L/opt/foolib/lib' ./configure --prefix='/var/tmp/myprog' This way `configure' will emit Makefiles that try to use the third-party library from `/opt/foolib' instead of the system-default location for header files and libraries. This may often be a lot easier than waiting until the necessary bits are installed in the ``official'' places at development systems. Developers who want to experiment with a new version of `libfoo', i.e. to integrate it with the rest of a program, can use custom `CPPFLAGS' and `LDFLAGS' while everyone else is merrily going along with the ``standard'' version of the `libfoo' library. 2. The _builder_ may be constrained in the sets of options he can pass to the `CFLAGS'. He is, after all, testing how a pristine, clean version of the program can build in what is defined as the ``official release'' environment. He may be allowed to tinker with include paths and library paths, but it is often safer to wrap the build process in scripts and tools that yield a repeatable, verifiable build process. This may preclude the use of options like `-I/custom/hdr/path' and `-L/custom/lib/path'. The builder of a program may not be an actual person, but a cron job or another automated process, i.e. a `nightly build' script that runs a clean build in a pristine environment, verifies that it can all complete without errors, and then emails one or more reports. When the builder _is_ a real person, he may be sharing roles with the third type of person involved in the build life of a program that uses the GNU build tools: the packaging person. 3. The _packager_ is someone who runs `make install', to produce the final program distribution and then bundles parts of or even all the files that are produced by the usual `install' target of GNU tools. The installation of all the files may be done in the default installation `prefix', but it may also be redirected to a staging area by setting `DESTDIR' in the environment: mkdir /var/tmp/proto env DESTDIR=/var/tmp/proto make install Depending on the type of the target system, and on particular needs of the packaging person, there may be cases where certain files have to be installed in a `non-standard' location, or in a location that was not foreseen by the original maintainer. In that case, the packager can use the `--libdir' and `--includedir' options to change the final, installed location of the relevant bits. A typical example is the case of Solaris systems, where libraries may be installed in `/usr/lib/64' for 64-bit architectures. When a packager prepares installation images for these architectures, he can build the program with: ./configure --prefix='/opt/foo' --libdir='$prefix/lib/64' All this is a pretty long-winded way of saying: The `--includedir' and `--libdir' options are not really something that is meant to be a convenience option for the _maintainer_ of a program,, the person who writes the code. They are meant to be useful tools for the _packager_ of the program, the person who builds and prepares the final, install-able images. If you are the maintainer, who writes the code of a program, and you find yourself in a position where you need to use the `--libdir' and the `--includedir' options, then YOU ARE DOING IT WRONG. and, as you have probably guessed by now: The Linux people of the original post are wrong. The GNU build tools are a relatively good set of tools to automate a lot of the mundane details of setting up a build system. It is unfortunate that many people who use them have absolutely no clue of what they are using, and they think that slapping a bunch of copy-paste snippets from Google searches in a `configure.in' script will magically turn any odd mess into a clean release process. Alas, Linux newbies are very often exactly _this_ sort of person :/ From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 1 20:14:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27B131065680 for ; Sat, 1 Nov 2008 20:14:47 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id 930958FC20 for ; Sat, 1 Nov 2008 20:14:46 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-005-011.pools.arcor-ip.net [88.66.5.11]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1KwMrs2Ca4-00049U; Sat, 01 Nov 2008 21:14:44 +0100 Received: (qmail 19804 invoked from network); 1 Nov 2008 20:14:43 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by mx.laiers.local with SMTP; 1 Nov 2008 20:14:43 -0000 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Sat, 1 Nov 2008 21:14:42 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <200810071314.45922.max@love2party.net> In-Reply-To: <200810071314.45922.max@love2party.net> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_ziLDJAOwuhgqv48" Message-Id: <200811012114.43137.max@love2party.net> X-Provags-ID: V01U2FsdGVkX197rV1LBJn24ZZVhJbAqQmdl62j+oMSp+vMZCs XmEPjo7mCMaEo/n/cC9BDI5q9EHGhAxuFAZeY+PN8Ketk50g3Z nneEnFYCSGq1VlLsWISAg== Cc: pjd@freebsd.org, koitsu@freebsd.org, lhmwzy@gmail.com, Pete French Subject: du -A / -B options [Re: zfs quota question] 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, 01 Nov 2008 20:14:47 -0000 --Boundary-00=_ziLDJAOwuhgqv48 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, a thread on freebsd-stable@ [1] about problems with du(1) and compressed zfs filesystems got me looking for a possible solution. Attached is a diff for du(1) that adds two new options: -A to display the apparent size of the file instead of the used blocks. -B bsize to specify a custom blocksize. In particular one <512byte The GNU du(1) has --apparent-size for -A, but we don't like long options. That's not to say that it couldn't be added for script compat. -B is probably not that interesting, but it can be helpful and came for free. Any objections against the general concept? It's rather complicated to get the apparent size of a directory hierarchy without scripting. I often wonder if some hierarchy will fit on a CD/DVD and compressed zfs makes this really difficult. As for the code, I know that there are a couple of style(9) errors in there - mostly because the lines already exceeded 80 chars before my changes and I plan to clean that up before I commit - should there be enough support for the change itself. Thoughts? [1] http://lists.freebsd.org/pipermail/freebsd-stable/2008-October/045698.html -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-00=_ziLDJAOwuhgqv48 Content-Type: text/plain; charset="iso-8859-15"; name="du.AB.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="du.AB.diff" Index: du.1 =================================================================== --- du.1 (revision 184513) +++ du.1 (working copy) @@ -40,11 +40,12 @@ .Nd display disk usage statistics .Sh SYNOPSIS .Nm +.Op Fl A .Op Fl H | L | P .Op Fl a | s | d Ar depth .Op Fl c .Op Fl l -.Op Fl h | k | m +.Op Fl h | k | m | B Ar blocksize .Op Fl n .Op Fl x .Op Fl I Ar mask @@ -60,6 +61,14 @@ .Pp The options are as follows: .Bl -tag -width indent +.It Fl A +Display the apparent size instead of the diskusage. +This can be helpful to find sparse files and when operating on +compressed volumes. +.It Fl B Ar blocksize +Display block counts in +.Ar blocksize +byte blocks. .It Fl H Symbolic links on the command line are followed, symbolic links in file hierarchies are not followed. @@ -136,14 +145,14 @@ If the environment variable .Ev BLOCKSIZE is set, and the -.Fl k -option is not specified, the block counts will be displayed in units of that +.Fl k, m, h, B +options are not specified, the block counts will be displayed in units of that size block. If .Ev BLOCKSIZE is not set, and the -.Fl k -option is not specified, the block counts will be displayed in 512-byte blocks. +.Fl k, m, h, B +options are not specified, the block counts will be displayed in 512-byte blocks. .El .Sh SEE ALSO .Xr df 1 , Index: du.c =================================================================== --- du.c (revision 184513) +++ du.c (working copy) @@ -86,27 +86,39 @@ FTS *fts; FTSENT *p; off_t savednumber = 0; - long blocksize; + long blocksize = 0; int ftsoptions; int listall; int depth; int Hflag, Lflag, Pflag, aflag, sflag, dflag, cflag; - int hflag, lflag, ch, notused, rval; + int Aflag, hflag, lflag, ch, notused, rval; char **save; static char dot[] = "."; setlocale(LC_ALL, ""); Hflag = Lflag = Pflag = aflag = sflag = dflag = cflag = hflag = - lflag = 0; + Aflag = lflag = 0; save = argv; ftsoptions = 0; depth = INT_MAX; SLIST_INIT(&ignores); - while ((ch = getopt(argc, argv, "HI:LPasd:chklmnrx")) != -1) + while ((ch = getopt(argc, argv, "AB:HI:LPasd:chklmnrx")) != -1) switch (ch) { + case 'A': + Aflag = 1; + if (blocksize == 0) + blocksize = 1; + break; + case 'B': + blocksize = atoi(optarg); + if (errno == ERANGE || blocksize < 0) { + warnx("invalid argument to option B: %s", optarg); + usage(); + } + break; case 'H': Hflag = 1; break; @@ -142,23 +154,18 @@ cflag = 1; break; case 'h': - if (setenv("BLOCKSIZE", "512", 1) == -1) - warn( - "setenv: cannot set BLOCKSIZE=512"); hflag = 1; break; case 'k': hflag = 0; - if (setenv("BLOCKSIZE", "1024", 1) == -1) - warn("setenv: cannot set BLOCKSIZE=1024"); + blocksize = 1024; break; case 'l': lflag = 1; break; case 'm': hflag = 0; - if (setenv("BLOCKSIZE", "1048576", 1) == -1) - warn("setenv: cannot set BLOCKSIZE=1048576"); + blocksize = 1048576; break; case 'n': nodumpflag = 1; @@ -222,8 +229,8 @@ argv[1] = NULL; } - (void) getbsize(¬used, &blocksize); - blocksize /= 512; + if (blocksize == 0) + (void) getbsize(¬used, &blocksize); rval = 0; @@ -241,15 +248,21 @@ break; p->fts_parent->fts_bignum += - p->fts_bignum += p->fts_statp->st_blocks; + p->fts_bignum += Aflag ? + p->fts_statp->st_size : + p->fts_statp->st_blocks; if (p->fts_level <= depth) { if (hflag) { - (void) prthumanval(howmany(p->fts_bignum, blocksize)); + (void) prthumanval(Aflag ? + p->fts_bignum : + p->fts_bignum * DEV_BSIZE); (void) printf("\t%s\n", p->fts_path); } else { (void) printf("%jd\t%s\n", - (intmax_t)howmany(p->fts_bignum, blocksize), + (intmax_t)howmany(Aflag ? + p->fts_bignum : + p->fts_bignum * DEV_BSIZE, blocksize), p->fts_path); } } @@ -272,17 +285,23 @@ if (listall || p->fts_level == 0) { if (hflag) { - (void) prthumanval(howmany(p->fts_statp->st_blocks, - blocksize)); + (void) prthumanval(Aflag ? + p->fts_statp->st_size : + p->fts_statp->st_blocks * DEV_BSIZE); (void) printf("\t%s\n", p->fts_path); } else { (void) printf("%jd\t%s\n", - (intmax_t)howmany(p->fts_statp->st_blocks, blocksize), - p->fts_path); + (intmax_t)howmany( Aflag ? + p->fts_statp->st_size : + p->fts_statp->st_blocks * + DEV_BSIZE, blocksize), + p->fts_path); } } - p->fts_parent->fts_bignum += p->fts_statp->st_blocks; + p->fts_parent->fts_bignum += Aflag ? + p->fts_statp->st_size : + p->fts_statp->st_blocks; } savednumber = p->fts_parent->fts_bignum; } @@ -441,8 +460,6 @@ { char buf[5]; - bytes *= DEV_BSIZE; - humanize_number(buf, sizeof(buf), bytes, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); @@ -453,8 +470,9 @@ usage(void) { (void)fprintf(stderr, - "usage: du [-H | -L | -P] [-a | -s | -d depth] [-c] " - "[-l] [-h | -k | -m] [-n] [-x] [-I mask] [file ...]\n"); + "usage: du [-A] [-H | -L | -P] [-a | -s | -d depth] [-c] " + "[-l] [-h | -k | -m | -B bsize] [-n] [-x] [-I mask] " + "[file ...]\n"); exit(EX_USAGE); } --Boundary-00=_ziLDJAOwuhgqv48--