From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 15 00:51:42 2009 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 D3D3E106564A for ; Sun, 15 Feb 2009 00:51:42 +0000 (UTC) (envelope-from kpielorz_lst@tdx.co.uk) Received: from lorca.tdx.co.uk (lorca.tdx.co.uk [62.13.128.6]) by mx1.freebsd.org (Postfix) with ESMTP id 68F7F8FC15 for ; Sun, 15 Feb 2009 00:51:42 +0000 (UTC) (envelope-from kpielorz_lst@tdx.co.uk) Received: from Octa64 (rainbow.tdx.co.uk [62.13.130.232] (may be forged)) (authenticated bits=0) by lorca.tdx.co.uk (8.14.0/8.14.0/Kp) with ESMTP id n1F0pePS003309; Sun, 15 Feb 2009 00:51:40 GMT Date: Sun, 15 Feb 2009 00:51:46 +0000 From: Karl Pielorz To: Max Laier , freebsd-hackers@freebsd.org Message-ID: <4FF0CBDE2E90DAFEDE59D777@Octa64> In-Reply-To: <200902132008.38110.max@love2party.net> References: <12320CD678FB9B76CA7A29F1@Octa64> <200902132008.38110.max@love2party.net> X-Mailer: Mulberry/4.0.8 (Win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Re: Tyan S2895 7.1 amd64 >8Gb RAM support? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2009 00:51:43 -0000 --On 13 February 2009 20:08 +0100 Max Laier wrote: > Can you maybe try to take the nVidia RAID out of the equation? I figure > the "professional" version of the chip is not that common so maybe the > corruption stems from the disk controller. Hi, I've tested with both Marvell (PCI-X), and Promise (PCI 32 Bit) SATA controllers now - it makes no difference. I upgraded the BIOS on the machine, and did a CMOS reset, then load factory defaults. I also then slowly upped the hw.physmem setting to see what would happen. I can now get this running at 8Gb [I've changed the email subject accordingly]. Any attempt to go over that (or remove the line from loader.conf completely) and it ends in the previous random crashes, compiler errors (e.g. warnings of internal bugs in gcc) - and occasional sig11's... e.g. >From compiling the kernel one time I got: " mkdep -f .depend -a -nostdinc -D_KERNEL -DKLD_MODULE -DHAVE_KERNEL_OPTION_HEADERS -I. -I@ -I@/contrib/altq -I/usr/src/sys/amd64/compile/GENERIC /usr/src/sys/modules/uslcom/../../dev/usb/uslcom.c ===> utopia (depend) @ -> /usr/src/sys /libexec/ld-elf.so.1: /lib/libc.so.7: Unsupported relocation type 88 in non-PLT relocations " I could probably live with only 8Gb in the machine, but it's going to be running some large ZFS pools (and a number of other tasks) - I'd like to have all 10Gb usable (especially if I move to 8.x eventually - and obviously, as it's physically in there, it'd be good to 'use it') Can anyone think of anything that is likely to break if you go >8Gb? [up from 4Gb since the BIOS was reflashed/reset & factory defaulted]. -Kp From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 15 13:06:41 2009 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 A2E47106566B for ; Sun, 15 Feb 2009 13:06:41 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 12DCB8FC08 for ; Sun, 15 Feb 2009 13:06:40 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id n1FD6dPX094406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 15 Feb 2009 14:06:39 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by cicely5.cicely.de (8.14.2/8.14.2) with ESMTP id n1FD6aJ8007514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 15 Feb 2009 14:06:36 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id n1FD6aJH086150; Sun, 15 Feb 2009 14:06:36 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id n1FD6aCr086149; Sun, 15 Feb 2009 14:06:36 +0100 (CET) (envelope-from ticso) Date: Sun, 15 Feb 2009 14:06:36 +0100 From: Bernd Walter To: Antti Louko Message-ID: <20090215130636.GM84964@cicely7.cicely.de> References: <5f67a8c40902141100w406b0a73h7cf487369e15ec8f@mail.gmail.com> <20090214203919.GV84964@cicely7.cicely.de> <4998034D.5020203@louko.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4998034D.5020203@louko.com> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.050, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: freebsd-hackers@freebsd.org, Zaphod Beeblebrox , ticso@cicely.de Subject: Re: When does the pool get bigger? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2009 13:06:42 -0000 On Sun, Feb 15, 2009 at 01:58:05PM +0200, Antti Louko wrote: > Bernd Walter wrote: > > On Sat, Feb 14, 2009 at 02:00:23PM -0500, Zaphod Beeblebrox wrote: > > >> When does the pool get bigger? The resilver of the last drive has finished, > >> but the pool still reads > > >> ... which is the size with 750G drives. > > > You need to export/import the pool once. > > A related issue. It is probably more of a generic ZFS code base thing, > but what do you think? > > It would be a nice idea to be able to _prevent_ ZFS pool from groving > automatically. This could be a flag in the pool label or anything. This > is not a real issue in FreeBSD at least for me because it is in any case > better to use glabel to label partitions so that the names don't change > between reboots when devices are added and removed. > > But with pool using whole disks this would be useful if one wants to > keep pool at certain size eg. to be able to temporarily use larger disks > and later move back to original-size disks. This wouldn't be an issue at all if the pool could shrink. Since it is on the TODO list I will wait. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 15 14:10:50 2009 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 2DA7D106567B for ; Sun, 15 Feb 2009 14:10:50 +0000 (UTC) (envelope-from alo-freebsd-lists@louko.com) Received: from x1.louko.com (x1.louko.com [195.218.71.106]) by mx1.freebsd.org (Postfix) with ESMTP id DEB8A8FC26 for ; Sun, 15 Feb 2009 14:10:49 +0000 (UTC) (envelope-from alo-freebsd-lists@louko.com) Received: from alo98.louko.com (alo98.louko.com [10.0.0.87]) by x1.louko.com (Postfix) with ESMTP id D5506135A73; Sun, 15 Feb 2009 11:58:05 +0000 (UTC) Message-ID: <4998034D.5020203@louko.com> Date: Sun, 15 Feb 2009 13:58:05 +0200 From: Antti Louko User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: ticso@cicely.de References: <5f67a8c40902141100w406b0a73h7cf487369e15ec8f@mail.gmail.com> <20090214203919.GV84964@cicely7.cicely.de> In-Reply-To: <20090214203919.GV84964@cicely7.cicely.de> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Zaphod Beeblebrox Subject: Re: When does the pool get bigger? 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, 15 Feb 2009 14:10:50 -0000 Bernd Walter wrote: > On Sat, Feb 14, 2009 at 02:00:23PM -0500, Zaphod Beeblebrox wrote: >> When does the pool get bigger? The resilver of the last drive has finished, >> but the pool still reads >> ... which is the size with 750G drives. > You need to export/import the pool once. A related issue. It is probably more of a generic ZFS code base thing, but what do you think? It would be a nice idea to be able to _prevent_ ZFS pool from groving automatically. This could be a flag in the pool label or anything. This is not a real issue in FreeBSD at least for me because it is in any case better to use glabel to label partitions so that the names don't change between reboots when devices are added and removed. But with pool using whole disks this would be useful if one wants to keep pool at certain size eg. to be able to temporarily use larger disks and later move back to original-size disks. From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 15 14:33:45 2009 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 C29A81065670 for ; Sun, 15 Feb 2009 14:33:45 +0000 (UTC) (envelope-from jkoshy.freebsd@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.188]) by mx1.freebsd.org (Postfix) with ESMTP id 5429D8FC1D for ; Sun, 15 Feb 2009 14:33:44 +0000 (UTC) (envelope-from jkoshy.freebsd@gmail.com) Received: by ti-out-0910.google.com with SMTP id a1so1194171tib.3 for ; Sun, 15 Feb 2009 06:33:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:to:cc :subject:in-reply-to:references:user-agent:mime-version:content-type :from:date; bh=O645SiU7c4kSo/YcTEXNX0iM7YvW0F3OZ8RVSInOjO0=; b=ev5nHu6Go4BfEZmuUU3dudk23T+qKU/2fB3C/ForDN6sgOzwQDu+wUhyADU40qIFBt VtKmK21F69SUmB+3BFlVa52ngcyuAzPUH/c21/bpGNuh+OVqO2SPtTSMneigptiSl38f LwgAG9hNnpASQr857dIwxew13ilyBAOxbN/oo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:to:cc:subject:in-reply-to:references:user-agent :mime-version:content-type:from:date; b=om8D2ZhmE+gLDviviE3bp4T/yDown+QVyaEwRrV2xHdgrPKPN7v5np6Q8Va2w68f2R SBGUd51c0mccFhwKRvm5WX8em/r+N2gzqx1DMkXgrmHLL5faHJ6ahVOp0uF3R3ZYxe5e puBlHc4iW2KsyXZ5gpGv0p8j8yI9bkvqOQZJc= Received: by 10.110.86.3 with SMTP id j3mr6940952tib.51.1234706651491; Sun, 15 Feb 2009 06:04:11 -0800 (PST) Received: from moria.unixconsulting.co.in ([117.195.163.228]) by mx.google.com with ESMTPS id b7sm8638038tic.15.2009.02.15.06.04.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 15 Feb 2009 06:04:09 -0800 (PST) Sender: Joseph Koshy Message-ID: <86skmfztrm.wl%koshy@unixconsulting.co.in> To: Robert Watson In-Reply-To: References: <200902121717.47841.max@love2party.net> <4994516B.8060703@freebsd.org> <200902121754.24536.max@love2party.net> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.3 (amd64-portbld-freebsd6.3) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII From: Joseph Koshy Date: Sun, 15 Feb 2009 13:59:41 -0000 Cc: Sam, Joseph Koshy , Leffler , freebsd-hackers@freebsd.org, Max Laier , Andrew Brampton Subject: Re: pahole - Finding holes in kernel structs 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, 15 Feb 2009 14:33:46 -0000 > Well, I think we want to inform this through actual measurement. Right now, > tools like hwpmc track cache misses by point in executable code, but what > would be nice is if we could post-process to generate cache miss information > by data structure field... That is one of the tools that I've had in mind. The hard part in the process is tracking sample locations back to source artifacts with acceptable accuracy. I couldn't find existing libraries with a compatible open-source license that I could build on, and thus the motivation for some of the libraries listed in the roadmap at http://elftoolchain.sourceforge.net/. Also, hwpmc(4) would need to be augmented to use "precise" sampling on the hardware that supports it, but this is relatively straightforward. Koshy From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 16 18:26:51 2009 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 22F5410656C0 for ; Mon, 16 Feb 2009 18:26:51 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 40B3F8FC1A for ; Mon, 16 Feb 2009 18:26:49 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA09898 for ; Mon, 16 Feb 2009 20:26:48 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4999AFE7.9070001@icyb.net.ua> Date: Mon, 16 Feb 2009 20:26:47 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.19 (X11/20090110) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: booting/loading a tool, not kernel 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, 16 Feb 2009 18:26:51 -0000 I'd like to add an entry to my loader menu to load/execute memtest86 instead of a kernel. It is built as standalone ELF executable, of course. Currently I go to a loader prompt and do: > unload > load /boot/memtest86 > boot Where should I look to get this into the forth code? Suppose I want to extend this approach. What would be a good name for subdirectory to put such tools? What would be a good way to add a sub-menu for such tools? Also, my current approach means that loader still first loads a standard kernel and its modules and then replaces them with memetest86. How to get to a loader menu without pre-loading anything? -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 10:37:34 2009 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 851941065673 for ; Tue, 17 Feb 2009 10:37:34 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from hpsmtp-eml18.kpnxchange.com (hpsmtp-eml18.KPNXCHANGE.COM [213.75.38.118]) by mx1.freebsd.org (Postfix) with ESMTP id 19D208FC17 for ; Tue, 17 Feb 2009 10:37:33 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from cpsmtp-eml102.kpnxchange.com ([213.75.84.102]) by hpsmtp-eml18.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 17 Feb 2009 11:25:29 +0100 Received: from uitsmijter.van-laarhoven.org ([81.207.207.222]) by cpsmtp-eml102.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 17 Feb 2009 11:25:28 +0100 Received: from van-laarhoven.org (hind.van-laarhoven.org [10.66.0.146]) (authenticated bits=0) by uitsmijter.van-laarhoven.org (8.14.3/8.14.3) with ESMTP id n1HARQiO049631; Tue, 17 Feb 2009 11:27:26 +0100 (CET) (envelope-from nick@van-laarhoven.org) Received: (nullmailer pid 2908 invoked by uid 1001); Tue, 17 Feb 2009 10:25:24 -0000 To: freebsd-hackers@freebsd.org Content-Disposition: inline From: Nick Hibma Date: Tue, 17 Feb 2009 11:25:23 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200902171125.24160.nick@van-laarhoven.org> X-Spam-Status: No, score=-3.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on uitsmijter.van-laarhoven.org X-OriginalArrivalTime: 17 Feb 2009 10:25:29.0052 (UTC) FILETIME=[0E2061C0:01C990EA] Cc: Andriy Gapon Subject: Re: booting/loading a tool, not kernel 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, 17 Feb 2009 10:37:35 -0000 You are aware of nextboot(8)? That you could use to specify the 'kernel' to load on next boot. Also boot.config(5) might be of use. Nick > I'd like to add an entry to my loader menu to load/execute memtest86 > instead of a kernel. It is built as standalone ELF executable, of course. > > Currently I go to a loader prompt and do: > > unload > > load /boot/memtest86 > > boot > > Where should I look to get this into the forth code? > > Suppose I want to extend this approach. > What would be a good name for subdirectory to put such tools? > What would be a good way to add a sub-menu for such tools? > > Also, my current approach means that loader still first loads a standard > kernel and its modules and then replaces them with memetest86. How to > get to a loader menu without pre-loading anything? From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 11:16:40 2009 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 0CD96106566C for ; Tue, 17 Feb 2009 11:16:40 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3898D8FC20 for ; Tue, 17 Feb 2009 11:16:38 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA11087; Tue, 17 Feb 2009 13:15:19 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <499A9C47.4070602@icyb.net.ua> Date: Tue, 17 Feb 2009 13:15:19 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.19 (X11/20090110) MIME-Version: 1.0 To: Nick Hibma References: <200902171125.24160.nick@van-laarhoven.org> In-Reply-To: <200902171125.24160.nick@van-laarhoven.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: booting/loading a tool, not kernel 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, 17 Feb 2009 11:16:40 -0000 on 17/02/2009 12:25 Nick Hibma said the following: > You are aware of nextboot(8)? That you could use to specify the 'kernel' to > load on next boot. > > Also boot.config(5) might be of use. Thanks a lot, these are very useful. But I am still thinking about an interactive menu where I could e.g. press '9' to go to "Utilities" and then could select memtest86 or memtest2009 or cputest :-) >> I'd like to add an entry to my loader menu to load/execute memtest86 >> instead of a kernel. It is built as standalone ELF executable, of course. >> >> Currently I go to a loader prompt and do: >>> unload >>> load /boot/memtest86 >>> boot >> Where should I look to get this into the forth code? >> >> Suppose I want to extend this approach. >> What would be a good name for subdirectory to put such tools? >> What would be a good way to add a sub-menu for such tools? >> >> Also, my current approach means that loader still first loads a standard >> kernel and its modules and then replaces them with memetest86. How to >> get to a loader menu without pre-loading anything? > > -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 12:08:23 2009 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 1826F10656BC for ; Tue, 17 Feb 2009 12:08:23 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 38A1D8FC1B for ; Tue, 17 Feb 2009 12:08:21 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA12324; Tue, 17 Feb 2009 14:08:00 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <499AA897.3020703@icyb.net.ua> Date: Tue, 17 Feb 2009 14:07:51 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.19 (X11/20090110) MIME-Version: 1.0 To: "Daniel O'Connor" References: <200902171125.24160.nick@van-laarhoven.org> <499A9C47.4070602@icyb.net.ua> <200902172230.25492.doconnor@gsoft.com.au> In-Reply-To: <200902172230.25492.doconnor@gsoft.com.au> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: booting/loading a tool, not kernel 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, 17 Feb 2009 12:08:26 -0000 on 17/02/2009 14:00 Daniel O'Connor said the following: > On Tuesday 17 February 2009 21:45:19 Andriy Gapon wrote: >> on 17/02/2009 12:25 Nick Hibma said the following: >>> You are aware of nextboot(8)? That you could use to specify the 'kernel' >>> to load on next boot. >>> >>> Also boot.config(5) might be of use. >> Thanks a lot, these are very useful. >> But I am still thinking about an interactive menu where I could e.g. >> press '9' to go to "Utilities" and then could select memtest86 or >> memtest2009 or cputest :-) > > That would be very handy IMO. > > What file do you use to run memtest etc? > Stephan Eisvogel shared his work on memtest86+ for FreeBSD. https://www.seitics.de/?e=47 I am now trying to make a minimalistic port out of his work. I mean - all the features that he added are very useful, but I want to get "official" memtest86+ and/or memtest86 ported with minimal changes. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 12:35:03 2009 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 7B4E01065673 for ; Tue, 17 Feb 2009 12:35:03 +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 002648FC1D for ; Tue, 17 Feb 2009 12:35:01 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.localnet (ppp121-45-206-137.lns10.adl2.internode.on.net [121.45.206.137]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n1HC0QBT073364 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Feb 2009 22:30:27 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Tue, 17 Feb 2009 22:30:11 +1030 User-Agent: KMail/1.10.4 (Linux/2.6.27-11-generic; KDE/4.1.4; i686; ; ) References: <200902171125.24160.nick@van-laarhoven.org> <499A9C47.4070602@icyb.net.ua> In-Reply-To: <499A9C47.4070602@icyb.net.ua> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1727168.di1xEEb7LQ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200902172230.25492.doconnor@gsoft.com.au> X-Spam-Score: -2.212 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: Andriy Gapon , Nick Hibma Subject: Re: booting/loading a tool, not kernel 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, 17 Feb 2009 12:35:04 -0000 --nextPart1727168.di1xEEb7LQ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 17 February 2009 21:45:19 Andriy Gapon wrote: > on 17/02/2009 12:25 Nick Hibma said the following: > > You are aware of nextboot(8)? That you could use to specify the 'kernel' > > to load on next boot. > > > > Also boot.config(5) might be of use. > > Thanks a lot, these are very useful. > But I am still thinking about an interactive menu where I could e.g. > press '9' to go to "Utilities" and then could select memtest86 or > memtest2009 or cputest :-) That would be very handy IMO. What file do you use to run memtest etc? =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 --nextPart1727168.di1xEEb7LQ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQBJmqbN5ZPcIHs/zowRAq8GAKCIp0SnspRMWd9s4ufoFyz/Ov/dVgCbBSGy BtR/OXfqdOpWIYQ4psnQsVI= =V/yC -----END PGP SIGNATURE----- --nextPart1727168.di1xEEb7LQ-- From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 18:29:34 2009 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 478611065686 for ; Tue, 17 Feb 2009 18:29:34 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: from hal.rescomp.berkeley.edu (hal.Rescomp.Berkeley.EDU [169.229.70.150]) by mx1.freebsd.org (Postfix) with ESMTP id 321558FC17 for ; Tue, 17 Feb 2009 18:29:34 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: by hal.rescomp.berkeley.edu (Postfix, from userid 1225) id 672533C044D; Tue, 17 Feb 2009 10:13:47 -0800 (PST) Date: Tue, 17 Feb 2009 10:13:47 -0800 From: Chris Cowart To: freebsd-hackers@freebsd.org Message-ID: <20090217181347.GC94579@hal.rescomp.berkeley.edu> Mail-Followup-To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="rz+pwK2yUstbofK6" Content-Disposition: inline Organization: RSSP-IT, UC Berkeley User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Kernel Crashes 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, 17 Feb 2009 18:29:34 -0000 --rz+pwK2yUstbofK6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, We have a system that has been experiencing 3-5 crashes per day for about 2 weeks now. The affected machine started as a 7.0 virtual machine cloned from our staging build. The production machine is running apache with mod_proxy and mongrel_cluster for a ruby on rails webapp. Shortly after rolling into production, the crashes began.=20 All of the crashes have been: fault code =3D supervisor read, page not present But there appears to be no rhyme or reason to the current process or current syscall (to my untrained eyes, at least). We also tried building a 7.1 vm from scratch, installing all the software, and rolling it out last night. Today, it crashed too. We are fairly certain this isn't a hardware problem, because we have many other FreeBSD vms running successfully on this ESX server. Here's today's 7.1 backtrace: | root optimus crash # kgdb /boot/kernel/kernel vmcore.0=20 | GNU gdb 6.1.1 [FreeBSD] | Copyright 2004 Free Software Foundation, Inc. | GDB is free software, covered by the GNU General Public License, and you = are | welcome to change it and/or distribute copies of it under certain conditi= ons. | Type "show copying" to see the conditions. | There is absolutely no warranty for GDB. Type "show warranty" for detail= s. | This GDB was configured as "i386-marcel-freebsd"... |=20 | Unread portion of the kernel message buffer: |=20 |=20 | Fatal trap 12: page fault while in kernel mode | cpuid =3D 0; apic id =3D 00 | fault virtual address =3D 0xc526b305 | fault code =3D supervisor read, page not present | instruction pointer =3D 0x20:0xc07e95b5 | stack pointer =3D 0x28:0xcd08fb18 | frame pointer =3D 0x28:0xcd08fb44 | code segment =3D base 0x0, limit 0xfffff, type 0x1b | =3D DPL 0, pres 1, def32 1, gran 1 | processor eflags =3D interrupt enabled, resume, IOPL =3D 0 | current process =3D 1158 (ruby18) | trap number =3D 12 | panic: page fault | cpuid =3D 0 | Uptime: 7h47m5s | Physical memory: 243 MB | Dumping 70 MB: 55 39 23 7 |=20 | Reading symbols from /boot/kernel/acpi.ko...Reading symbols from /boot/ke= rnel/acpi.ko.symbols...done. | done. | Loaded symbols for /boot/kernel/acpi.ko | Reading symbols from /boot/kernel/ipfw.ko...Reading symbols from /boot/ke= rnel/ipfw.ko.symbols...done. | done. | Loaded symbols for /boot/kernel/ipfw.ko | #0 doadump () at pcpu.h:196 | 196 pcpu.h: No such file or directory. | in pcpu.h | (kgdb) where | #0 doadump () at pcpu.h:196 | #1 0xc07998c7 in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c= :418 | #2 0xc0799b99 in panic (fmt=3DVariable "fmt" is not available. | ) at /usr/src/sys/kern/kern_shutdown.c:574 | #3 0xc0ad6a9c in trap_fatal (frame=3D0xcd08fad8, eva=3D3307647749) | at /usr/src/sys/i386/i386/trap.c:939 | #4 0xc0ad6d20 in trap_pfault (frame=3D0xcd08fad8, usermode=3D0, eva=3D33= 07647749) | at /usr/src/sys/i386/i386/trap.c:852 | #5 0xc0ad76dc in trap (frame=3D0xcd08fad8) at /usr/src/sys/i386/i386/tra= p.c:530 | #6 0xc0abd54b in calltrap () at /usr/src/sys/i386/i386/exception.s:159 | #7 0xc07e95b5 in m_uiotombuf (uio=3D0xcd08fbe8, how=3D2, len=3D2048, ali= gn=3D76,=20 | flags=3D2) at /usr/src/sys/kern/uipc_mbuf.c:1747 | #8 0xc07f16d5 in sosend_generic (so=3D0xc24d2680, addr=3D0x0, uio=3D0xcd= 08fbe8,=20 | top=3D0x0, control=3D0x0, flags=3D0, td=3D0xc23a6000) | at /usr/src/sys/kern/uipc_socket.c:1219 | #9 0xc07ed2ff in sosend (so=3D0xc24d2680, addr=3D0x0, uio=3D0xcd08fbe8, = top=3D0x0,=20 | control=3D0x0, flags=3D0, td=3D0xc23a6000) | at /usr/src/sys/kern/uipc_socket.c:1288 | #10 0xc07f4606 in kern_sendit (td=3D0xc23a6000, s=3D5, mp=3D0xcd08fc64, f= lags=3D0,=20 | control=3D0x0, segflg=3DUIO_USERSPACE) at /usr/src/sys/kern/uipc_sysc= alls.c:805 | #11 0xc07f7851 in sendit (td=3D0xc23a6000, s=3D5, mp=3D0xcd08fc64, flags= =3D0) | at /usr/src/sys/kern/uipc_syscalls.c:742 | #12 0xc07f7968 in sendto (td=3D0xc23a6000, uap=3D0xcd08fcfc) | at /usr/src/sys/kern/uipc_syscalls.c:857 | #13 0xc0ad7075 in syscall (frame=3D0xcd08fd38) | at /usr/src/sys/i386/i386/trap.c:1090 | #14 0xc0abd5b0 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception= =2Es:255 | #15 0x00000033 in ?? () | Previous frame inner to this frame (corrupt stack?) And here's a previous 7.0 backtrace: | ccowart hal optimus $ cat vmcore.1.bt=20 | GNU gdb 6.1.1 [FreeBSD] | Copyright 2004 Free Software Foundation, Inc. | GDB is free software, covered by the GNU General Public License, and you = are | welcome to change it and/or distribute copies of it under certain conditi= ons. | Type "show copying" to see the conditions. | There is absolutely no warranty for GDB. Type "show warranty" for detail= s. | This GDB was configured as "i386-marcel-freebsd". |=20 | Unread portion of the kernel message buffer: |=20 |=20 | Fatal trap 12: page fault while in kernel mode | cpuid =3D 0; apic id =3D 00 | fault virtual address =3D 0x640d6b5d | fault code =3D supervisor read, page not present | instruction pointer =3D 0x20:0xc07a9f7b | stack pointer =3D 0x28:0xcc793a10 | frame pointer =3D 0x28:0xcc793a20 | code segment =3D base 0x0, limit 0xfffff, type 0x1b | =3D DPL 0, pres 1, def32 1, gran 1 | processor eflags =3D interrupt enabled, resume, IOPL =3D 0 | current process =3D 28 (irq18: le0) | trap number =3D 12 | panic: page fault | cpuid =3D 0 | Uptime: 17h8m27s | Physical memory: 243 MB | Dumping 98 MB: 83 67 51 35 19 3 |=20 | #0 doadump () at pcpu.h:195 | in pcpu.h | (kgdb) #0 doadump () at pcpu.h:195 | #1 0xc075cf37 in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c= :409 | #2 0xc075d1f9 in panic (fmt=3D) at /usr/src/sys/kern/kern_shutdown.c:563 | #3 0xc0a7c6ac in trap_fatal (frame=3D0xcc7939d0, eva=3D1678601053) | at /usr/src/sys/i386/i386/trap.c:899 | #4 0xc0a7c930 in trap_pfault (frame=3D0xcc7939d0, usermode=3D0, eva=3D16= 78601053) | at /usr/src/sys/i386/i386/trap.c:812 | #5 0xc0a7d2dc in trap (frame=3D0xcc7939d0) at /usr/src/sys/i386/i386/tra= p.c:490 | #6 0xc0a6325b in calltrap () at /usr/src/sys/i386/i386/exception.s:139 | #7 0xc07a9f7b in m_tag_delete_chain (m=3D0xc49da000, t=3D0x0) | at /usr/src/sys/kern/uipc_mbuf2.c:355 | #8 0xc074ef05 in mb_dtor_mbuf (mem=3D0xc49da000, size=3D256, arg=3D) | at /usr/src/sys/kern/kern_mbuf.c:409 | #9 0xc099a1ef in uma_zfree_arg (zone=3D0xc1466d20, item=3D0xc49da000, ud= ata=3D0x0) | at /usr/src/sys/vm/uma_core.c:2255 | #10 0xc07ab683 in sbdrop_internal (sb=3D0xc26eda24, len=3D122) at uma.h:3= 05 | #11 0xc07ab77e in sbdrop_locked (sb=3D0xc26eda24, len=3D122) | at /usr/src/sys/kern/uipc_sockbuf.c:899 | #12 0xc0899c9b in tcp_do_segment (m=3D0xc244c800, th=3D0xc36ba024, so=3D0= xc26ed948,=20 | tp=3D0xc25051d0, drop_hdrlen=3D52, tlen=3D666) | at /usr/src/sys/netinet/tcp_input.c:2031 | #13 0xc089b501 in tcp_input (m=3D0xc244c800, off0=3D20) | at /usr/src/sys/netinet/tcp_input.c:845 | #14 0xc083cb59 in ip_input (m=3D0xc244c800) | at /usr/src/sys/netinet/ip_input.c:665 | #15 0xc07fc945 in netisr_dispatch (num=3D2, m=3D0xc244c800) | at /usr/src/sys/net/netisr.c:185 | #16 0xc07f2981 in ether_demux (ifp=3D0xc2227000, m=3D0xc244c800) | at /usr/src/sys/net/if_ethersubr.c:834 | #17 0xc07f2d73 in ether_input (ifp=3D0xc2227000, m=3D0xc244c800) | at /usr/src/sys/net/if_ethersubr.c:692 | #18 0xc05e520c in am79900_intr (arg=3D0xc2183000) | at /usr/src/sys/dev/le/am79900.c:340 | #19 0xc074015b in ithread_loop (arg=3D0xc22266f0) | at /usr/src/sys/kern/kern_intr.c:1036 | #20 0xc073cf59 in fork_exit (callout=3D0xc073ffb0 ,=20 | arg=3D0xc22266f0, frame=3D0xcc793d38) at /usr/src/sys/kern/kern_fork.= c:781 | #21 0xc0a632d0 in fork_trampoline () at /usr/src/sys/i386/i386/exception.= s:205 And one more from 7.0, just for show: | ccowart hal optimus $ cat vmcore.3.bt=20 | GNU gdb 6.1.1 [FreeBSD] | Copyright 2004 Free Software Foundation, Inc. | GDB is free software, covered by the GNU General Public License, and you = are | welcome to change it and/or distribute copies of it under certain conditi= ons. | Type "show copying" to see the conditions. | There is absolutely no warranty for GDB. Type "show warranty" for detail= s. | This GDB was configured as "i386-marcel-freebsd". |=20 | Unread portion of the kernel message buffer: |=20 |=20 | Fatal trap 12: page fault while in kernel mode | cpuid =3D 0; apic id =3D 00 | fault virtual address =3D 0xf98ca8a2 | fault code =3D supervisor read, page not present | instruction pointer =3D 0x20:0xc07a82b4 | stack pointer =3D 0x28:0xcd057248 | frame pointer =3D 0x28:0xcd057274 | code segment =3D base 0x0, limit 0xfffff, type 0x1b | =3D DPL 0, pres 1, def32 1, gran 1 | processor eflags =3D interrupt enabled, resume, IOPL =3D 0 | current process =3D 1032 (syslog-ng) | trap number =3D 12 | panic: page fault | cpuid =3D 0 | Uptime: 1d21h31m10s | Physical memory: 243 MB | Dumping 68 MB: 52 36 20 4 |=20 | #0 doadump () at pcpu.h:195 | in pcpu.h | (kgdb) #0 doadump () at pcpu.h:195 | #1 0xc075cf37 in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c= :409 | #2 0xc075d1f9 in panic (fmt=3D) at /usr/src/sys/kern/kern_shutdown.c:563 | #3 0xc0a7c6ac in trap_fatal (frame=3D0xcd057208, eva=3D4186744994) | at /usr/src/sys/i386/i386/trap.c:899 | #4 0xc0a7c930 in trap_pfault (frame=3D0xcd057208, usermode=3D0, eva=3D41= 86744994) | at /usr/src/sys/i386/i386/trap.c:812 | #5 0xc0a7d2dc in trap (frame=3D0xcd057208) at /usr/src/sys/i386/i386/tra= p.c:490 | #6 0xc0a6325b in calltrap () at /usr/src/sys/i386/i386/exception.s:139 | #7 0xc07a82b4 in m_copym (m=3D0xf98ca88e, off0=3D1500, len=3D16, wait=3D= 1) | at mbuf.h:454 | #8 0xc083df55 in ip_fragment (ip=3D0xc2310434, m_frag=3D0xcd057344, mtu= =3D1500,=20 | if_hwassist_flags=3D0, sw_csum=3D1) at /usr/src/sys/netinet/ip_output= =2Ec:726 | #9 0xc083ec2e in ip_output (m=3D0xc2310400, opt=3D0x0, ro=3D0xcd057308, = flags=3D2,=20 | imo=3D0x0, inp=3D0x0) at /usr/src/sys/netinet/ip_output.c:565 | #10 0xc08d711d in ipsec_process_done (m=3D0xc2310400, isr=3D0xc2435080) | at /usr/src/sys/netipsec/ipsec_output.c:177 | #11 0xc08e49a5 in ah_output_cb (crp=3D0xc2497528) | at /usr/src/sys/netipsec/xform_ah.c:1193 | #12 0xc0924330 in crypto_done (crp=3D0xc2497528) | at /usr/src/sys/opencrypto/crypto.c:1148 | #13 0xc092773e in swcr_process (dev=3D0xc21f5a00, crp=3D0xc2497528, hint= =3D0) | at /usr/src/sys/opencrypto/cryptosoft.c:975 | #14 0xc0925376 in crypto_invoke (cap=3D0xc21f5a00, crp=3D0xc2497528, hint= =3D0) | at cryptodev_if.h:53 | #15 0xc0925dbc in crypto_dispatch (crp=3D0xc2497528) | at /usr/src/sys/opencrypto/crypto.c:798 | #16 0xc08e504f in ah_output (m=3D0xc2310400, isr=3D0xc2435080, mp=3D0x0, = skip=3D20,=20 | protoff=3D9) at /usr/src/sys/netipsec/xform_ah.c:1102 | #17 0xc08d743b in ipsec4_process_packet (m=3D0xc24d4a00, isr=3D0xc2435080= ,=20 | flags=3D0, tunalready=3D0) at /usr/src/sys/netipsec/ipsec_output.c:486 | #18 0xc08d70ae in ipsec_process_done (m=3D0xc24d4a00, isr=3D0xc2435100) | at /usr/src/sys/netipsec/ipsec_output.c:160 | #19 0xc08e629c in esp_output_cb (crp=3D0xc24975a0) | at /usr/src/sys/netipsec/xform_esp.c:965 | #20 0xc0924330 in crypto_done (crp=3D0xc24975a0) | at /usr/src/sys/opencrypto/crypto.c:1148 | #21 0xc092773e in swcr_process (dev=3D0xc21f5a00, crp=3D0xc24975a0, hint= =3D0) | at /usr/src/sys/opencrypto/cryptosoft.c:975 | #22 0xc0925376 in crypto_invoke (cap=3D0xc21f5a00, crp=3D0xc24975a0, hint= =3D0) | at cryptodev_if.h:53 | #23 0xc0925dbc in crypto_dispatch (crp=3D0xc24975a0) | at /usr/src/sys/opencrypto/crypto.c:798 | #24 0xc08e6906 in esp_output (m=3D0xc24d4a00, isr=3D0xc2435100, mp=3D0x0,= skip=3D20,=20 | protoff=3D9) at /usr/src/sys/netipsec/xform_esp.c:875 | #25 0xc08d743b in ipsec4_process_packet (m=3D0xc24d4a00, isr=3D0xc2435100= ,=20 | flags=3D0, tunalready=3D0) at /usr/src/sys/netipsec/ipsec_output.c:486 | #26 0xc083cee3 in ip_ipsec_output (m=3D0xcd057af8, inp=3D0xc23d0000,=20 | flags=3D0xcd057b04, error=3D0xcd057ad8, ro=3D0xcd057b00, iproute=3D0x= cd057abc,=20 | dst=3D0xcd057ad4, ia=3D0xcd057ad0, ifp=3D0xcd057ae0) | at /usr/src/sys/netinet/ip_ipsec.c:331 | #27 0xc083e9af in ip_output (m=3D0xc24d4a00, opt=3D0x0, ro=3D0xcd057abc, = flags=3D0,=20 | imo=3D0x0, inp=3D0xc23d0000) at /usr/src/sys/netinet/ip_output.c:418 | #28 0xc08a85b3 in udp_send (so=3D0xc24a1000, flags=3D0, m=3D0xc24d4a00, a= ddr=3D0x0,=20 | control=3D0x0, td=3D0xc2337420) at /usr/src/sys/netinet/udp_usrreq.c:= 972 | #29 0xc07af576 in sosend_dgram (so=3D0xc24a1000, addr=3D0x0, uio=3D0xcd05= 7c60,=20 | top=3D0xc24d4a00, control=3D0x0, flags=3D) | at /usr/src/sys/kern/uipc_socket.c:1053 | #30 0xc07ac41f in sosend (so=3D0xc24a1000, addr=3D0x0, uio=3D0xcd057c60, = top=3D0x0,=20 | control=3D0x0, flags=3D0, td=3D0xc2337420) | at /usr/src/sys/kern/uipc_socket.c:1286 | #31 0xc0796a1b in soo_write (fp=3D0xc2354e58, uio=3D0xcd057c60,=20 | active_cred=3D0xc20f8200, flags=3D0, td=3D0xc2337420) | at /usr/src/sys/kern/sys_socket.c:103 | #32 0xc07900c7 in dofilewrite (td=3D0xc2337420, fd=3D8, fp=3D0xc2354e58,= =20 | auio=3D0xcd057c60, offset=3D-1, flags=3D0) at file.h:254 | #33 0xc07903a8 in kern_writev (td=3D0xc2337420, fd=3D8, auio=3D0xcd057c60) | at /usr/src/sys/kern/sys_generic.c:401 | #34 0xc079041f in write (td=3D0xc2337420, uap=3D0xcd057cfc) | at /usr/src/sys/kern/sys_generic.c:317 | #35 0xc0a7cc85 in syscall (frame=3D0xcd057d38) | at /usr/src/sys/i386/i386/trap.c:1035 | #36 0xc0a632c0 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception= =2Es:196 | #37 0x00000033 in ?? () Our custom kernel config is: | include GENERIC | ident RCBSD_REL7 | options IPSEC =20 | options IPSEC_FILTERTUNNEL | device crypto | options QUOTA I'm pretty sure the kernel isn't supposed to crash, so any tips on fixing whatever it is that's broken here? --=20 Chris Cowart Network Technical Lead Network & Infrastructure Services, RSSP-IT UC Berkeley --rz+pwK2yUstbofK6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iQIcBAEBAwAGBQJJmv5bAAoJEIGh6j3cHUNPIO0P/1jM84F6K/0Up+SkjG7Q7VyA b8QDfIJStiYY1pchDtvw1RCRGjMxlpt7G2pkW8REaIOBeACSiASSY2anlsbzbz6Y 8TQUPDMN0IQbHjSnfimwPUy/2cGDp/5TqZsiI5ovAV1vU6M8W6+ohgtcE6OB5PQb je0D2DWrmt1zK0E3JJkKDO7nivoCyowJ75cEwRqA8jstexKfK0zbzBNFMLdprjpk ELyWaXLaQOLIJIvc0E6/DruuIW0eXG86Be0OLwNBarchOSFAlomfPS3M/lQrKLz2 fDYLaQWxLic6/rGl5KOibKXIhtdniZ4hQYFSp30i0nAmvDgPnu+XfWA6syJPC+rI QNSddDyzbCI/ClPNvRkwESUa0ClphVGnq2VfBtwyXhgo5AUAlBiuxGjzpWYkC1E+ v20gG0uZCFGt11CGtTVJjz4ehQ6l6MkQbYAC70yF9KuA8DcIzPdIuqIwcdCUzkKL H6Wv6NIYcMuGhlSeyOt4zkIFNMc+Ghy88kmyS7k3An7ItBNLPn62TdePi98+m3E+ dbNfqseMu/lJ7I78cP0knWoJ0g+vaFcjNMkKo0+iLbVrSzc7bBPYeD0vH/mlu3az Uft4w8jABL+9wXNtaHAmBpuUsUNsDlgrspOP496yT6zcqJJ4XS96ENVfdhMio0w+ tHJmwEI50R/Gt/nuxzKq =jcO7 -----END PGP SIGNATURE----- --rz+pwK2yUstbofK6-- From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 22:23:23 2009 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 10A301065670; Tue, 17 Feb 2009 22:23:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D4F198FC16; Tue, 17 Feb 2009 22:23:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 561C646B35; Tue, 17 Feb 2009 17:23:22 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n1HMNEkY037171; Tue, 17 Feb 2009 17:23:14 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 17 Feb 2009 09:31:12 -0500 User-Agent: KMail/1.9.7 References: <20090213183229.GA94272@freebsd.org> <20090213221607.GA25161@freebsd.org> In-Reply-To: <20090213221607.GA25161@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902170931.12983.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 17 Feb 2009 17:23:14 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8998/Mon Feb 16 22:40:00 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00, DATE_IN_PAST_06_12 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Roman Divacky , hackers@freebsd.org, Ryan Stone Subject: Re: TUNABLE_INT 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: Tue, 17 Feb 2009 22:23:23 -0000 On Friday 13 February 2009 5:16:07 pm Roman Divacky wrote: > On Fri, Feb 13, 2009 at 03:55:44PM -0500, Ryan Stone wrote: > > __FILE__ is a string so you can't concat that with anything to produce an > > identifier. In any case, the variable is static so there can't be any > > collision problems with other files. > > I was talking about the SYSINIT parameter. thats a section in a .o > file, and I am getting collisions there... Hmm, are you doing something like this: #define FOO(string) \ TUNABLE_INT(string ## ".bar", &bar); \ TUNABLE_INT(string ## ".foo", &foo); \ FOO(baz) That would collide as both of the TUNABLE_INT() invocations would have the same __LINE__ (the line number of the 'FOO(baz)'). -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 22:23:23 2009 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 10A301065670; Tue, 17 Feb 2009 22:23:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D4F198FC16; Tue, 17 Feb 2009 22:23:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 561C646B35; Tue, 17 Feb 2009 17:23:22 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n1HMNEkY037171; Tue, 17 Feb 2009 17:23:14 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 17 Feb 2009 09:31:12 -0500 User-Agent: KMail/1.9.7 References: <20090213183229.GA94272@freebsd.org> <20090213221607.GA25161@freebsd.org> In-Reply-To: <20090213221607.GA25161@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902170931.12983.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 17 Feb 2009 17:23:14 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8998/Mon Feb 16 22:40:00 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00, DATE_IN_PAST_06_12 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Roman Divacky , hackers@freebsd.org, Ryan Stone Subject: Re: TUNABLE_INT 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: Tue, 17 Feb 2009 22:23:23 -0000 On Friday 13 February 2009 5:16:07 pm Roman Divacky wrote: > On Fri, Feb 13, 2009 at 03:55:44PM -0500, Ryan Stone wrote: > > __FILE__ is a string so you can't concat that with anything to produce an > > identifier. In any case, the variable is static so there can't be any > > collision problems with other files. > > I was talking about the SYSINIT parameter. thats a section in a .o > file, and I am getting collisions there... Hmm, are you doing something like this: #define FOO(string) \ TUNABLE_INT(string ## ".bar", &bar); \ TUNABLE_INT(string ## ".foo", &foo); \ FOO(baz) That would collide as both of the TUNABLE_INT() invocations would have the same __LINE__ (the line number of the 'FOO(baz)'). -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 22:24:44 2009 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 69BEA10656CE; Tue, 17 Feb 2009 22:24:44 +0000 (UTC) (envelope-from rdivacky@vlk.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 1BF8B8FC20; Tue, 17 Feb 2009 22:24:43 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 515569CB0FB; Tue, 17 Feb 2009 23:21:44 +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 PIDEFEHT6ITp; Tue, 17 Feb 2009 23:21:42 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 1EB089CB125; Tue, 17 Feb 2009 23:21:42 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id n1HMLg7c094998; Tue, 17 Feb 2009 23:21:42 +0100 (CET) (envelope-from rdivacky) Date: Tue, 17 Feb 2009 23:21:42 +0100 From: Roman Divacky To: John Baldwin Message-ID: <20090217222142.GA94925@freebsd.org> References: <20090213183229.GA94272@freebsd.org> <20090213221607.GA25161@freebsd.org> <200902170931.12983.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200902170931.12983.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Ryan Stone Subject: Re: TUNABLE_INT 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: Tue, 17 Feb 2009 22:24:44 -0000 On Tue, Feb 17, 2009 at 09:31:12AM -0500, John Baldwin wrote: > On Friday 13 February 2009 5:16:07 pm Roman Divacky wrote: > > On Fri, Feb 13, 2009 at 03:55:44PM -0500, Ryan Stone wrote: > > > __FILE__ is a string so you can't concat that with anything to produce an > > > identifier. In any case, the variable is static so there can't be any > > > collision problems with other files. > > > > I was talking about the SYSINIT parameter. thats a section in a .o > > file, and I am getting collisions there... > > Hmm, are you doing something like this: > > #define FOO(string) \ > TUNABLE_INT(string ## ".bar", &bar); \ > TUNABLE_INT(string ## ".foo", &foo); \ > > FOO(baz) > > That would collide as both of the TUNABLE_INT() invocations would have the > same __LINE__ (the line number of the 'FOO(baz)'). no.. it was just two tunables in two files that happened to end up in the same line. fixed now From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 22:40:39 2009 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 CBD0A106566B for ; Tue, 17 Feb 2009 22:40:39 +0000 (UTC) (envelope-from rdivacky@vlk.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 844728FC0A for ; Tue, 17 Feb 2009 22:40:38 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 515569CB0FB; Tue, 17 Feb 2009 23:21:44 +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 PIDEFEHT6ITp; Tue, 17 Feb 2009 23:21:42 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 1EB089CB125; Tue, 17 Feb 2009 23:21:42 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id n1HMLg7c094998; Tue, 17 Feb 2009 23:21:42 +0100 (CET) (envelope-from rdivacky) Date: Tue, 17 Feb 2009 23:21:42 +0100 From: Roman Divacky To: John Baldwin Message-ID: <20090217222142.GA94925@freebsd.org> References: <20090213183229.GA94272@freebsd.org> <20090213221607.GA25161@freebsd.org> <200902170931.12983.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200902170931.12983.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Ryan Stone Subject: Re: TUNABLE_INT 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: Tue, 17 Feb 2009 22:40:40 -0000 On Tue, Feb 17, 2009 at 09:31:12AM -0500, John Baldwin wrote: > On Friday 13 February 2009 5:16:07 pm Roman Divacky wrote: > > On Fri, Feb 13, 2009 at 03:55:44PM -0500, Ryan Stone wrote: > > > __FILE__ is a string so you can't concat that with anything to produce an > > > identifier. In any case, the variable is static so there can't be any > > > collision problems with other files. > > > > I was talking about the SYSINIT parameter. thats a section in a .o > > file, and I am getting collisions there... > > Hmm, are you doing something like this: > > #define FOO(string) \ > TUNABLE_INT(string ## ".bar", &bar); \ > TUNABLE_INT(string ## ".foo", &foo); \ > > FOO(baz) > > That would collide as both of the TUNABLE_INT() invocations would have the > same __LINE__ (the line number of the 'FOO(baz)'). no.. it was just two tunables in two files that happened to end up in the same line. fixed now From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 23:09:42 2009 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 7E70A10656E7; Tue, 17 Feb 2009 23:09:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4C5858FC19; Tue, 17 Feb 2009 23:09:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 07E9146B23; Tue, 17 Feb 2009 18:09:42 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n1HN9adV037468; Tue, 17 Feb 2009 18:09:36 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Roman Divacky Date: Tue, 17 Feb 2009 17:51:13 -0500 User-Agent: KMail/1.9.7 References: <20090213183229.GA94272@freebsd.org> <200902170931.12983.jhb@freebsd.org> <20090217222142.GA94925@freebsd.org> In-Reply-To: <20090217222142.GA94925@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902171751.13962.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 17 Feb 2009 18:09:36 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8998/Mon Feb 16 22:40:00 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Ryan Stone Subject: Re: TUNABLE_INT 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: Tue, 17 Feb 2009 23:09:44 -0000 On Tuesday 17 February 2009 5:21:42 pm Roman Divacky wrote: > On Tue, Feb 17, 2009 at 09:31:12AM -0500, John Baldwin wrote: > > On Friday 13 February 2009 5:16:07 pm Roman Divacky wrote: > > > On Fri, Feb 13, 2009 at 03:55:44PM -0500, Ryan Stone wrote: > > > > __FILE__ is a string so you can't concat that with anything to produce an > > > > identifier. In any case, the variable is static so there can't be any > > > > collision problems with other files. > > > > > > I was talking about the SYSINIT parameter. thats a section in a .o > > > file, and I am getting collisions there... > > > > Hmm, are you doing something like this: > > > > #define FOO(string) \ > > TUNABLE_INT(string ## ".bar", &bar); \ > > TUNABLE_INT(string ## ".foo", &foo); \ > > > > FOO(baz) > > > > That would collide as both of the TUNABLE_INT() invocations would have the > > same __LINE__ (the line number of the 'FOO(baz)'). > > no.. it was just two tunables in two files that happened to end up in the same > line. fixed now Hmmm, odd. Those should be static and not matter. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 23:09:42 2009 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 7E70A10656E7; Tue, 17 Feb 2009 23:09:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4C5858FC19; Tue, 17 Feb 2009 23:09:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 07E9146B23; Tue, 17 Feb 2009 18:09:42 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n1HN9adV037468; Tue, 17 Feb 2009 18:09:36 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Roman Divacky Date: Tue, 17 Feb 2009 17:51:13 -0500 User-Agent: KMail/1.9.7 References: <20090213183229.GA94272@freebsd.org> <200902170931.12983.jhb@freebsd.org> <20090217222142.GA94925@freebsd.org> In-Reply-To: <20090217222142.GA94925@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902171751.13962.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 17 Feb 2009 18:09:36 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8998/Mon Feb 16 22:40:00 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Ryan Stone Subject: Re: TUNABLE_INT 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: Tue, 17 Feb 2009 23:09:44 -0000 On Tuesday 17 February 2009 5:21:42 pm Roman Divacky wrote: > On Tue, Feb 17, 2009 at 09:31:12AM -0500, John Baldwin wrote: > > On Friday 13 February 2009 5:16:07 pm Roman Divacky wrote: > > > On Fri, Feb 13, 2009 at 03:55:44PM -0500, Ryan Stone wrote: > > > > __FILE__ is a string so you can't concat that with anything to produce an > > > > identifier. In any case, the variable is static so there can't be any > > > > collision problems with other files. > > > > > > I was talking about the SYSINIT parameter. thats a section in a .o > > > file, and I am getting collisions there... > > > > Hmm, are you doing something like this: > > > > #define FOO(string) \ > > TUNABLE_INT(string ## ".bar", &bar); \ > > TUNABLE_INT(string ## ".foo", &foo); \ > > > > FOO(baz) > > > > That would collide as both of the TUNABLE_INT() invocations would have the > > same __LINE__ (the line number of the 'FOO(baz)'). > > no.. it was just two tunables in two files that happened to end up in the same > line. fixed now Hmmm, odd. Those should be static and not matter. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 01:18:16 2009 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 00E2A10656E9 for ; Wed, 18 Feb 2009 01:18:16 +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 4C1408FC14 for ; Wed, 18 Feb 2009 01:18:14 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.localnet (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 n1I1IBtP033561 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 Feb 2009 11:48:13 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Andriy Gapon Date: Wed, 18 Feb 2009 11:48:02 +1030 User-Agent: KMail/1.10.4 (Linux/2.6.27-11-generic; KDE/4.1.4; i686; ; ) References: <200902171125.24160.nick@van-laarhoven.org> <200902172230.25492.doconnor@gsoft.com.au> <499AA897.3020703@icyb.net.ua> In-Reply-To: <499AA897.3020703@icyb.net.ua> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1680878.qjYiq2xesd"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200902181148.10206.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: freebsd-hackers@freebsd.org Subject: Re: booting/loading a tool, not kernel 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, 18 Feb 2009 01:18:16 -0000 --nextPart1680878.qjYiq2xesd Content-Type: text/plain; charset="koi8-u" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 17 February 2009 22:37:51 Andriy Gapon wrote: > on 17/02/2009 14:00 Daniel O'Connor said the following: > > On Tuesday 17 February 2009 21:45:19 Andriy Gapon wrote: > >> on 17/02/2009 12:25 Nick Hibma said the following: > >>> You are aware of nextboot(8)? That you could use to specify the > >>> 'kernel' to load on next boot. > >>> > >>> Also boot.config(5) might be of use. > >> > >> Thanks a lot, these are very useful. > >> But I am still thinking about an interactive menu where I could e.g. > >> press '9' to go to "Utilities" and then could select memtest86 or > >> memtest2009 or cputest :-) > > > > That would be very handy IMO. > > > > What file do you use to run memtest etc? > > Stephan Eisvogel shared his work on memtest86+ for FreeBSD. > https://www.seitics.de/?e=3D47 Thanks. > I am now trying to make a minimalistic port out of his work. > I mean - all the features that he added are very useful, but I want to > get "official" memtest86+ and/or memtest86 ported with minimal changes. Yes, it would be very useful IMO. If you have the loader look for extra stuff in some directory under /boot t= hen=20 other things could be added as ports without requiring changes to the loade= r=20 each time. Although, just a fixed test for memtest would be fantastic :) =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 --nextPart1680878.qjYiq2xesd Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQBJm2HL5ZPcIHs/zowRAh3gAJ4oWKp5H/2tl6s5ZdURQuz7VbJyhwCgnZxA BSXIe+j0I1ar+GGu20XpK5g= =UxPb -----END PGP SIGNATURE----- --nextPart1680878.qjYiq2xesd-- From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 08:02:59 2009 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 F36181065673; Wed, 18 Feb 2009 08:02:58 +0000 (UTC) (envelope-from rdivacky@vlk.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 AAF718FC38; Wed, 18 Feb 2009 08:02:58 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 3B9359CB084; Wed, 18 Feb 2009 08:59:58 +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 biF6ne595m9E; Wed, 18 Feb 2009 08:59:56 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id DEEDB9CB125; Wed, 18 Feb 2009 08:59:55 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id n1I7xtcL066649; Wed, 18 Feb 2009 08:59:55 +0100 (CET) (envelope-from rdivacky) Date: Wed, 18 Feb 2009 08:59:55 +0100 From: Roman Divacky To: John Baldwin Message-ID: <20090218075955.GA66426@freebsd.org> References: <20090213183229.GA94272@freebsd.org> <200902170931.12983.jhb@freebsd.org> <20090217222142.GA94925@freebsd.org> <200902171751.13962.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200902171751.13962.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Ryan Stone Subject: Re: TUNABLE_INT 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: Wed, 18 Feb 2009 08:02:59 -0000 On Tue, Feb 17, 2009 at 05:51:13PM -0500, John Baldwin wrote: > On Tuesday 17 February 2009 5:21:42 pm Roman Divacky wrote: > > On Tue, Feb 17, 2009 at 09:31:12AM -0500, John Baldwin wrote: > > > On Friday 13 February 2009 5:16:07 pm Roman Divacky wrote: > > > > On Fri, Feb 13, 2009 at 03:55:44PM -0500, Ryan Stone wrote: > > > > > __FILE__ is a string so you can't concat that with anything to produce > an > > > > > identifier. In any case, the variable is static so there can't be any > > > > > collision problems with other files. > > > > > > > > I was talking about the SYSINIT parameter. thats a section in a .o > > > > file, and I am getting collisions there... > > > > > > Hmm, are you doing something like this: > > > > > > #define FOO(string) \ > > > TUNABLE_INT(string ## ".bar", &bar); \ > > > TUNABLE_INT(string ## ".foo", &foo); \ > > > > > > FOO(baz) > > > > > > That would collide as both of the TUNABLE_INT() invocations would have the > > > same __LINE__ (the line number of the 'FOO(baz)'). > > > > no.. it was just two tunables in two files that happened to end up in the > same > > line. fixed now > > Hmmm, odd. Those should be static and not matter. the symbol itself is static, but the section ELF section created might collide. anyway, this has been fixed and is not a problem anymore for me From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 08:02:59 2009 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 F36181065673; Wed, 18 Feb 2009 08:02:58 +0000 (UTC) (envelope-from rdivacky@vlk.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 AAF718FC38; Wed, 18 Feb 2009 08:02:58 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 3B9359CB084; Wed, 18 Feb 2009 08:59:58 +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 biF6ne595m9E; Wed, 18 Feb 2009 08:59:56 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id DEEDB9CB125; Wed, 18 Feb 2009 08:59:55 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id n1I7xtcL066649; Wed, 18 Feb 2009 08:59:55 +0100 (CET) (envelope-from rdivacky) Date: Wed, 18 Feb 2009 08:59:55 +0100 From: Roman Divacky To: John Baldwin Message-ID: <20090218075955.GA66426@freebsd.org> References: <20090213183229.GA94272@freebsd.org> <200902170931.12983.jhb@freebsd.org> <20090217222142.GA94925@freebsd.org> <200902171751.13962.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200902171751.13962.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Ryan Stone Subject: Re: TUNABLE_INT 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: Wed, 18 Feb 2009 08:02:59 -0000 On Tue, Feb 17, 2009 at 05:51:13PM -0500, John Baldwin wrote: > On Tuesday 17 February 2009 5:21:42 pm Roman Divacky wrote: > > On Tue, Feb 17, 2009 at 09:31:12AM -0500, John Baldwin wrote: > > > On Friday 13 February 2009 5:16:07 pm Roman Divacky wrote: > > > > On Fri, Feb 13, 2009 at 03:55:44PM -0500, Ryan Stone wrote: > > > > > __FILE__ is a string so you can't concat that with anything to produce > an > > > > > identifier. In any case, the variable is static so there can't be any > > > > > collision problems with other files. > > > > > > > > I was talking about the SYSINIT parameter. thats a section in a .o > > > > file, and I am getting collisions there... > > > > > > Hmm, are you doing something like this: > > > > > > #define FOO(string) \ > > > TUNABLE_INT(string ## ".bar", &bar); \ > > > TUNABLE_INT(string ## ".foo", &foo); \ > > > > > > FOO(baz) > > > > > > That would collide as both of the TUNABLE_INT() invocations would have the > > > same __LINE__ (the line number of the 'FOO(baz)'). > > > > no.. it was just two tunables in two files that happened to end up in the > same > > line. fixed now > > Hmmm, odd. Those should be static and not matter. the symbol itself is static, but the section ELF section created might collide. anyway, this has been fixed and is not a problem anymore for me From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 08:34:28 2009 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 126D81065672 for ; Wed, 18 Feb 2009 08:34:28 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id 999A98FC1B for ; Wed, 18 Feb 2009 08:34:27 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: by ewy14 with SMTP id 14so2884743ewy.19 for ; Wed, 18 Feb 2009 00:34:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition; bh=XDJPpLrk+0r70bT4WvUeU7Z2c2/r0UOfHVAicNOv7BA=; b=NrjpXre+kSSDUbEEGpHvYyyA4B/tiGZdwcidelWsx2CPga7y4oH577o2/gjEgCs1jX i+ex7+gyOFeVxJ+4KFPiYBfpveNR6q99aB83igvb6Bf7yQdXCj0ZHJra8iF58wKCEyo7 vRBiBB9CYH7pmliWZk+jF5WskhcFZuxKbEm7E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition; b=mg5ZMiYYEKHVX5X39VRCkZX6e5yRPzYG/klv3nKCnp47mFTVpSXrfrEX2Q0lK53lZx iuKEHeZKCh7UzgT5K5Q8f8qT9kOP6tBCkXISC9/hU+tIfqnchdFViXKgJ3rx735weIw2 LHARRyJm6ZzDoVvvWNMX3YwsUfkDBnlAAYr/8= Received: by 10.210.12.18 with SMTP id 18mr5019142ebl.110.1234946066730; Wed, 18 Feb 2009 00:34:26 -0800 (PST) Received: from logik.internal.network (81-86-41-187.dsl.pipex.com [81.86.41.187]) by mx.google.com with ESMTPS id 23sm12519292eya.36.2009.02.18.00.34.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Feb 2009 00:34:26 -0800 (PST) Received: by logik.internal.network (Postfix, from userid 11001) id 50A2F5CA8; Wed, 18 Feb 2009 08:34:24 +0000 (UTC) Date: Wed, 18 Feb 2009 08:34:24 +0000 From: xorquewasp@googlemail.com To: freebsd-hackers@freebsd.org Message-ID: <20090218083424.GA62198@logik.internal.network> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: Simulating bad network conditions 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, 18 Feb 2009 08:34:28 -0000 Hello. I want to verify that a program I'm developing works correctly in poor network conditions (high latency, random packet loss, etc). I seem to remember reading something once about somebody simulating these conditions with PF but can't remember where. Anybody got any ideas about how I could go about doing this? Ideally it won't involve starting up a hundred large BitTorrent downloads and randomly ripping out network cables... thanks, xw From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 08:42:02 2009 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 1FDFC1065672 for ; Wed, 18 Feb 2009 08:42:02 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (cl-2958.ham-01.de.sixxs.net [IPv6:2001:6f8:900:b8d::2]) by mx1.freebsd.org (Postfix) with ESMTP id 826708FC12 for ; Wed, 18 Feb 2009 08:42:01 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.14.2/8.14.2) with ESMTP id n1I8g0eT073649; Wed, 18 Feb 2009 11:42:00 +0300 (MSK) (envelope-from maxim@macomnet.ru) Date: Wed, 18 Feb 2009 11:42:00 +0300 (MSK) From: Maxim Konovalov To: xorquewasp@googlemail.com In-Reply-To: <20090218083424.GA62198@logik.internal.network> Message-ID: <20090218114128.B73352@mp2.macomnet.net> References: <20090218083424.GA62198@logik.internal.network> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-hackers@freebsd.org Subject: Re: Simulating bad network conditions 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, 18 Feb 2009 08:42:02 -0000 On Wed, 18 Feb 2009, 08:34-0000, xorquewasp@googlemail.com wrote: > Hello. > > I want to verify that a program I'm developing works correctly > in poor network conditions (high latency, random packet loss, etc). > > I seem to remember reading something once about somebody simulating > these conditions with PF but can't remember where. > > Anybody got any ideas about how I could go about doing this? > ipfw(8) prob + dummynet(8). -- Maxim Konovalov From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 08:57:19 2009 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 A0D52106564A for ; Wed, 18 Feb 2009 08:57:19 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by mx1.freebsd.org (Postfix) with ESMTP id 2D8A88FC18 for ; Wed, 18 Feb 2009 08:57:18 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: by nf-out-0910.google.com with SMTP id e27so297221nfd.33 for ; Wed, 18 Feb 2009 00:57:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:cc :subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to; bh=GG9b9Y/Q2XzwsQ+5sTNPWy7wpJYKxNZZRlqWRccp4VY=; b=vYLbFkI0TcmFMjD2SejhQFugkcDb5fa0qYjqSz/279zwcRcUwLpHa6JKxcTSX791O0 McTJ0ooAzZy9f4vyF0vI1nw2cdN7PR3bZip8ucryAc0Fd1sZS6+3STcXNcSgBXdQNMid EFIHgV/DNsMNHMiYEuqlKv4qcO/r5NVJKKsTY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; b=kuxEUCK+riJprwNNRvR2RmQVaPNVlQYKJj+VmP5NhH/b3mwsME0uUNgydLlefvpXl9 Luyu2Do1sfb17QOBw1KscgahSnjmmkNAwQ+jEQifts1yDjmdSMLXtQO4T8VA4nzWje9e 0HeJiLO1ARv39eBKajn6+7f4oHMo3RZKBqAqQ= Received: by 10.210.62.3 with SMTP id k3mr6104449eba.46.1234947438054; Wed, 18 Feb 2009 00:57:18 -0800 (PST) Received: from logik.internal.network (81-86-41-187.dsl.pipex.com [81.86.41.187]) by mx.google.com with ESMTPS id 10sm1858731eyz.30.2009.02.18.00.57.17 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Feb 2009 00:57:17 -0800 (PST) Received: by logik.internal.network (Postfix, from userid 11001) id F30A95CA8; Wed, 18 Feb 2009 08:57:15 +0000 (UTC) Date: Wed, 18 Feb 2009 08:57:15 +0000 From: xorquewasp@googlemail.com To: Maxim Konovalov Message-ID: <20090218085715.GA9821@logik.internal.network> References: <20090218083424.GA62198@logik.internal.network> <20090218114128.B73352@mp2.macomnet.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090218114128.B73352@mp2.macomnet.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Simulating bad network conditions 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, 18 Feb 2009 08:57:19 -0000 On 2009-02-18 11:42:00, Maxim Konovalov wrote: > > ipfw(8) prob + dummynet(8). > Hi. Thanks for the quick response. Is there, by any chance, an equivalent for PF? I see there's 'ALTQ' but it looks to be poorly supported (unless I misunderstand). I have quite a complicated setup here with PF forwarding and jails and I'm not sure how well ipfw will play along. thanks, xw From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 09:01:52 2009 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 0C8EC106564A for ; Wed, 18 Feb 2009 09:01:52 +0000 (UTC) (envelope-from kpielorz_lst@tdx.co.uk) Received: from lorca.tdx.co.uk (lorca.tdx.co.uk [62.13.128.6]) by mx1.freebsd.org (Postfix) with ESMTP id 79AA38FC12 for ; Wed, 18 Feb 2009 09:01:51 +0000 (UTC) (envelope-from kpielorz_lst@tdx.co.uk) Received: from Works64.dmpriest.net.uk (thebrick.dmpriest.net.uk [62.13.130.30]) by lorca.tdx.co.uk (8.14.0/8.14.0/Kp) with ESMTP id n1I91nfR042575; Wed, 18 Feb 2009 09:01:49 GMT Date: Wed, 18 Feb 2009 09:01:19 +0000 From: Karl Pielorz To: Max Laier , freebsd-hackers@freebsd.org, Yamagi Burmeister Message-ID: <626FC588D3A7707FC1186924@Works64.dmpriest.net.uk> In-Reply-To: <4FF0CBDE2E90DAFEDE59D777@Octa64> References: <12320CD678FB9B76CA7A29F1@Octa64> <200902132008.38110.max@love2party.net> <4FF0CBDE2E90DAFEDE59D777@Octa64> X-Mailer: Mulberry/4.0.8 (Win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Re: Tyan S2895 7.1 amd64 >8Gb RAM support? - resolved 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, 18 Feb 2009 09:01:52 -0000 Hi, I finally resolved this... (posted to the list for completeness / incase someone else hits this issue). Brief Solution: Reduce dram timing in the bios from DDR400 to DDR333. Gory details: Having taken quite a trip through mptables, bioses, pulling / pushing DIMM's etc. - all the DIMM's in the machine are DDR400 rated - all do test OK. Also remember this machine was used for years under WinXP64/Vista (including using things like a 6Gb RAM drive for video production) - if it had been corrupting data as much as under FreeBSD it would have been noticed :( Anyway, it transpires earlier Opterons were either incapable of running DDR400, or had a 'caveat' that when running lots of memory modules they recommended dropping the timing from DDR400 downwards. This was 'apparently' fixed in later Opterons (my system has 2 * E Stepping 285's). To counter this the BIOS would detect which CPU was in use, and drop the maximum memory speed accordingly vs. installed DIMM slots. This restriction was apparently lifted for Opteron 285's (at least for the stepping I'm using) as their onboard memory controller should be capable of driving all memory banks, at DDR400 speeds - the BIOS reflects this by defaulting to DDR400 timing for my system. Obviously, this works on this system under Windows memory usage patterns / loading / stress - but not for FreeBSD's memory usage / loading. With the RAM backed down to DDR333 - the system once again runs flawlessly. RAM tests didn't catch this - as I could only effectively test 4Gb of RAM 'at a time' - I also doubt that the memory usage patterns software such as memtest86 use would 'load' the memory system enough to cause the timing problem. Max Laier did say he'd had to make memory timing adjustments on his S2895 system, but I presumed that with DDR400 rated memory, and the BIOS using the SPD details on the chips (all branded RAM) that it wouldn't be that (and the fact windows gave years of service with the current settings). -Kp [Who now knows far more than I ever wanted to about mptables, APIC, ASL and hopefully a whole bunch of other stuff I can forget now ;)] From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 10:24:36 2009 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 E37BA10656C1 for ; Wed, 18 Feb 2009 10:24:36 +0000 (UTC) (envelope-from tim@clewlow.org) Received: from clewlow.org (clewlow.org [210.215.149.194]) by mx1.freebsd.org (Postfix) with ESMTP id 3AF078FC16 for ; Wed, 18 Feb 2009 10:24:36 +0000 (UTC) (envelope-from tim@clewlow.org) Received: from 192.168.1.100 (localhost [127.0.0.1]) by clewlow.org (Postfix) with ESMTP id 9946A1C082B; Wed, 18 Feb 2009 20:46:45 +1100 (EST) Received: from 192.168.1.10 (SquirrelMail authenticated user tim) by 192.168.1.100 with HTTP; Wed, 18 Feb 2009 20:46:45 +1100 (EST) Message-ID: <2294403bfa2d98673c5d5748496a6d64.squirrel@192.168.1.100> In-Reply-To: <20090218085715.GA9821@logik.internal.network> References: <20090218083424.GA62198@logik.internal.network> <20090218114128.B73352@mp2.macomnet.net> <20090218085715.GA9821@logik.internal.network> Date: Wed, 18 Feb 2009 20:46:45 +1100 (EST) From: "Tim Clewlow" To: xorquewasp@googlemail.com User-Agent: SquirrelMail/1.4.15 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-hackers@freebsd.org Subject: Re: Simulating bad network conditions 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, 18 Feb 2009 10:24:37 -0000 Here is a link to a mailing list post about a patch to give dummynet support in pf. It is _fairly_ recent and so may still be a little buggy, but the poster seems quite confident that it works as intended. http://www.mail-archive.com/freebsd-pf@freebsd.org/msg03857.html Cheers, Tim. > On 2009-02-18 11:42:00, Maxim Konovalov wrote: >> >> ipfw(8) prob + dummynet(8). >> > > Hi. Thanks for the quick response. > > Is there, by any chance, an equivalent for PF? I see there's 'ALTQ' > but it looks to be poorly supported (unless I misunderstand). I have > quite a complicated setup here with PF forwarding and jails and I'm > not sure how well ipfw will play along. > > thanks, > xw From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 10:39:25 2009 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 DEED01065672 for ; Wed, 18 Feb 2009 10:39:25 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (brucec-1-pt.tunnel.tserv4.nyc4.ipv6.he.net [IPv6:2001:470:1f06:c09::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9BCF68FC0C for ; Wed, 18 Feb 2009 10:39:25 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 57A3719014; Wed, 18 Feb 2009 10:39:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on muon X-Spam-Level: X-Spam-Status: No, score=-2.3 required=8.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 Received: from tau.draftnet (unknown [IPv6:2a01:348:10f:0:21e:ecff:fef5:fd4f]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Wed, 18 Feb 2009 10:39:24 +0000 (GMT) Date: Wed, 18 Feb 2009 10:39:03 +0000 From: Bruce Cran To: xorquewasp@googlemail.com Message-ID: <20090218103903.5aee2d7d@tau.draftnet> In-Reply-To: <20090218085715.GA9821@logik.internal.network> References: <20090218083424.GA62198@logik.internal.network> <20090218114128.B73352@mp2.macomnet.net> <20090218085715.GA9821@logik.internal.network> X-Mailer: Claws Mail 3.7.0 (GTK+ 2.14.7; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Simulating bad network conditions 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, 18 Feb 2009 10:39:26 -0000 On Wed, 18 Feb 2009 08:57:15 +0000 xorquewasp@googlemail.com wrote: > On 2009-02-18 11:42:00, Maxim Konovalov wrote: > > > > ipfw(8) prob + dummynet(8). > > > > Hi. Thanks for the quick response. > > Is there, by any chance, an equivalent for PF? I see there's 'ALTQ' > but it looks to be poorly supported (unless I misunderstand). I have > quite a complicated setup here with PF forwarding and jails and I'm > not sure how well ipfw will play along. ALTQ can drop 20% of packets using something like: block in proto icmp probability 20% It seems ALTQ can't delay packets though, so you'd need to use dummynet for that. -- Bruce Cran From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 18:12:27 2009 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 E8FF9106567B for ; Wed, 18 Feb 2009 18:12:27 +0000 (UTC) (envelope-from prvs=julian=2936e3358@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id D0E828FC1E for ; Wed, 18 Feb 2009 18:12:27 +0000 (UTC) (envelope-from prvs=julian=2936e3358@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.56]) by smtp-outbound.ironport.com with ESMTP; 18 Feb 2009 09:44:07 -0800 Message-ID: <499C48F8.1080604@elischer.org> Date: Wed, 18 Feb 2009 09:44:24 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Bruce Cran References: <20090218083424.GA62198@logik.internal.network> <20090218114128.B73352@mp2.macomnet.net> <20090218085715.GA9821@logik.internal.network> <20090218103903.5aee2d7d@tau.draftnet> In-Reply-To: <20090218103903.5aee2d7d@tau.draftnet> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, xorquewasp@googlemail.com Subject: Re: Simulating bad network conditions 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, 18 Feb 2009 18:12:29 -0000 Bruce Cran wrote: > On Wed, 18 Feb 2009 08:57:15 +0000 > xorquewasp@googlemail.com wrote: > >> On 2009-02-18 11:42:00, Maxim Konovalov wrote: >>> ipfw(8) prob + dummynet(8). >>> >> Hi. Thanks for the quick response. >> >> Is there, by any chance, an equivalent for PF? I see there's 'ALTQ' >> but it looks to be poorly supported (unless I misunderstand). I have >> quite a complicated setup here with PF forwarding and jails and I'm >> not sure how well ipfw will play along. > > ALTQ can drop 20% of packets using something like: > > block in proto icmp probability 20% > > It seems ALTQ can't delay packets though, so you'd need to use dummynet > for that. > vimage it the tool for you it can REALLY simulate a lot of network setups. From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 19:18:24 2009 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 D3DE41065674 for ; Wed, 18 Feb 2009 19:18:24 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: from mail-bw0-f170.google.com (mail-bw0-f170.google.com [209.85.218.170]) by mx1.freebsd.org (Postfix) with ESMTP id 5B8A78FC1A for ; Wed, 18 Feb 2009 19:18:23 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: by bwz18 with SMTP id 18so175133bwz.19 for ; Wed, 18 Feb 2009 11:18:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=u6JEUjNBCMI1lw7TNnTFBwBVxACdzQt48nM56uAIRuc=; b=V/9bsSxI79oiW7Cb38erRC1Yrusu9PVInj2yeaOyXmnp8Kcki965xp+lEDqp0Rb/c9 Oab2ZB9aQZl6di/hy+v96/X2XWd7BHhhWEiuAGO/1my1yIJoM+y+hpDUBm4BKOSdet1n cthbxQWeCrNF6ErhPyxNMDaqsxndPmoCPgERA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=Q4p+W2ol7rexVOlOm439x6ePwi9LT+RW+TpsIIlUowYObeJX+yFF0Kqc7lTa62qZme dVf0kl66MTr8W1vFce2iJDm9ZqzNy58qsq8GY+6aSChJQfYkPWuG+igQyX8I5NNhn1iB WHZwU+GMaL7+tQVhk2FmJvTXRKEAoEDBbS5OQ= Received: by 10.103.171.6 with SMTP id y6mr3142582muo.110.1234984702848; Wed, 18 Feb 2009 11:18:22 -0800 (PST) Received: from ?192.168.1.11? (dyn.144-85-166-174.dsl.vtx.ch [144.85.166.174]) by mx.google.com with ESMTPS id t10sm342799muh.58.2009.02.18.11.18.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Feb 2009 11:18:22 -0800 (PST) Message-Id: From: =?UTF-8?Q?Nikola_Kne=C5=BEevi=C4=87?= To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Wed, 18 Feb 2009 20:18:20 +0100 X-Mailer: Apple Mail (2.930.3) Subject: Obtaining l2 misses and cpu utilization in a module 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, 18 Feb 2009 19:18:25 -0000 Hi, I would like to obtain fore mentioned data from within my module. I need these performance metrics to see how certain code executes, and make decisions during the runtime. pmc(3) seems complete, but it also seems to be intended for use in the userland. How to use pmc from modules? Is there any other way? Also, module is amd64 only, so I don't care about portability. Cheers, Nikola From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 17:37:30 2009 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 21FD71065852 for ; Wed, 18 Feb 2009 17:37:30 +0000 (UTC) (envelope-from lgj@usenix.org) Received: from usenix.org (voyager.usenix.org [131.106.3.1]) by mx1.freebsd.org (Postfix) with ESMTP id 0C27F8FC29 for ; Wed, 18 Feb 2009 17:37:30 +0000 (UTC) (envelope-from lgj@usenix.org) Received: from tuvok.usenix.org (tuvok.usenix.org [131.106.3.36]) by usenix.org (8.13.6/8.13.6) with ESMTP id n1IH4AUw021122 for ; Wed, 18 Feb 2009 09:04:10 -0800 (PST) Message-ID: <499C3F8A.5070607@usenix.org> Date: Wed, 18 Feb 2009 09:04:10 -0800 From: Lionel Garth Jones User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Usenix-Metrics: voyager; whitelist X-Mailman-Approved-At: Wed, 18 Feb 2009 19:31:17 +0000 Subject: HotPar '09: Attendance Now Open to Everyone 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, 18 Feb 2009 17:37:35 -0000 The First USENIX Workshop on Hot Topics in Parallelism will take place March 30-31 in Berkeley, CA. http://www.usenix.org/hotpar09/proga HotPar '09 will bring together researchers and practitioners doing innovative work in the area of parallel computing. HotPar recognizes the broad impact of multicore computing and seeks relevant contributions from all fields, including application design, languages and compilers, systems, and architecture. Attendance to the workshop is now open to the USENIX community. To ensure a productive environment, it will be limited to 75 participants. Register today to ensure your place. This year's outstanding program includes a diverse range of hot research areas including models and paradigms, operating systems and middleware, transactional memory, and more. Please join us at the Claremont Resort & Spa for this new workshop covering the most innovative research in parallel computing. We look forward to seeing you there. Sincerely, Alexandra Fedorova, Simon Fraser University Jim Larus, Microsoft HotPar '09 Program Co-Chairs hotpar09chairs@usenix.org ------------------------------------------------------------------------ First USENIX Workshop on Hot Topics in Parallelism (HotPar '09) March 30-31, 2009 Berkeley, CA, USA http://www.usenix.org/hotpar09/proga ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 19:39:47 2009 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 E91091065670 for ; Wed, 18 Feb 2009 19:39:47 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id BA3F38FC1D for ; Wed, 18 Feb 2009 19:39:46 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from localhost (mail.lan.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id C95E9AFC1FE; Wed, 18 Feb 2009 10:22:43 -0900 (AKST) From: Mel To: freebsd-hackers@freebsd.org Date: Wed, 18 Feb 2009 09:48:04 -0900 User-Agent: KMail/1.9.10 References: <20090218083424.GA62198@logik.internal.network> <20090218085715.GA9821@logik.internal.network> <20090218103903.5aee2d7d@tau.draftnet> In-Reply-To: <20090218103903.5aee2d7d@tau.draftnet> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902180948.04532.fbsd.hackers@rachie.is-a-geek.net> Cc: Bruce Cran , xorquewasp@googlemail.com Subject: Re: Simulating bad network conditions 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, 18 Feb 2009 19:39:48 -0000 On Wednesday 18 February 2009 01:39:03 Bruce Cran wrote: > It seems ALTQ can't delay packets though, so you'd need to use dummynet > for that. You can work around it using hfsc's realtime: hfsc(realtime (0Kb 300 128Kb)) 1. 0Kbit of bandwidth guaranteed for the first 300ms 2. After 300ms 128Kbit of bandwidth is provided 3. When using this method, the first value must be 0. Though, this only works when under pressure. If enough bandwidth is available, the delay won't happen. More info here: http://www.probsd.net/pf/index.php/Hednod%27s_HFSC_explained -- Mel From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 21:28:45 2009 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 891D21065673 for ; Wed, 18 Feb 2009 21:28:45 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 6FEEF8FC0A for ; Wed, 18 Feb 2009 21:28:45 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 30349 invoked from network); 18 Feb 2009 13:01:03 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 18 Feb 2009 13:01:03 -0800 From: Sean Bruno To: hackers@freebsd.org Content-Type: text/plain Date: Wed, 18 Feb 2009 13:02:03 -0800 Message-Id: <1234990923.20261.26.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Content-Transfer-Encoding: 7bit Cc: Subject: Module Dependencies 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, 18 Feb 2009 21:28:45 -0000 I'm messing around with dev/firewire/sbp_targ at home this week and wanted to know if there was a way to warn or notify when trying to run config against a kernel configuration file that has "device sbp_targ" but doesn't have "device targbh". Is there such a mechanism? Sean From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 21:56:19 2009 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 29438106577C for ; Wed, 18 Feb 2009 21:56:19 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id DC9D88FC2F for ; Wed, 18 Feb 2009 21:56:18 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.3/8.14.3) with ESMTP id n1ILuIGw029523; Wed, 18 Feb 2009 13:56:18 -0800 (PST) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.3/8.14.3/Submit) id n1ILuI8h029522; Wed, 18 Feb 2009 13:56:18 -0800 (PST) (envelope-from david) Date: Wed, 18 Feb 2009 13:56:18 -0800 From: David Wolfskill To: Nikola Kne??evi?? Message-ID: <20090218215618.GV81076@albert.catwhisker.org> Mail-Followup-To: David Wolfskill , Nikola Kne??evi?? , freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xoUDadTz98C4LPSf" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: Obtaining l2 misses and cpu utilization in a module 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, 18 Feb 2009 21:56:20 -0000 --xoUDadTz98C4LPSf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 18, 2009 at 08:18:20PM +0100, Nikola Kne??evi?? wrote: > Hi, >=20 > I would like to obtain fore mentioned data from within my module. I =20 > need these performance metrics to see how certain code executes, and =20 > make decisions during the runtime. pmc(3) seems complete, but it also =20 > seems to be intended for use in the userland. >=20 > How to use pmc from modules? Is there any other way? Also, module is =20 > amd64 only, so I don't care about portability. I'm not sure what you mean by "module" ini this context. But CPU utilization my be found in the kern.cp_time sysctl value; per-core utilization may be found in the kern.cp_times sysctl value. Note that these are arrays of counters; a given set of values will be foir "user", "nice", "system", "interrupt", and "idle" CPU time (in that order). The differences between respective counters at each end of a time interval of interest will be informative. Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --xoUDadTz98C4LPSf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkmchAEACgkQmprOCmdXAD1L/gCfVn828SouTXKgSeGGlxtTS6Fq 6KEAn2fQJKeFDilI/8Ca6wxpHjulB8G9 =Za0g -----END PGP SIGNATURE----- --xoUDadTz98C4LPSf-- From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 22:35:24 2009 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 2D1D510656C9 for ; Wed, 18 Feb 2009 22:35:24 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by mx1.freebsd.org (Postfix) with ESMTP id 86B048FC33 for ; Wed, 18 Feb 2009 22:35:23 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so837625fgb.35 for ; Wed, 18 Feb 2009 14:35:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=C4B0Hl96ARKRxuswPLZyZHw9s85NVSH+3awz+OKuSfI=; b=I62/ZgsmleAqGqHXCElFrgmhT3tei4c6v1WIvePThCBUUNbgNReXoz0M+C1SZXvnKR bw6SPcSVzz1lb5rpM4y1CWlP8rsfm3lMnn2Hv+yEC8dHCNNPFy/HcJ4LmPeEuX33Sdna 9DSkzrf+F4Ug48i0r/QjuGPlFzcXhz9vUfRw0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=tIqyEtj3eIv1jlWCic10sX26Yl6wEbsVP8kMc1wiVRWeYTdZ+bF6pGkiG01grkL51j cfB1j134rFQlxqHMmWb68RFa1a54ixs8Tr/BWbg3aDe/JCGh0cOAoEQxgNTRRnTKjmI8 lvTzxJI68P569pWKDqEP9Sayvx9Wi3R2B4sBc= MIME-Version: 1.0 Received: by 10.86.60.14 with SMTP id i14mr3070255fga.21.1234996522612; Wed, 18 Feb 2009 14:35:22 -0800 (PST) Date: Thu, 19 Feb 2009 01:35:22 +0300 Message-ID: From: pluknet To: svn-src-all@freebsd.org, freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: OT: svn commit: r188764 - head/sys/kern 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, 18 Feb 2009 22:35:27 -0000 Hi. Am I right that td_estcpu is only updated under SCHED_4BSD ? (well, user's ki_estcpu is not used in top anyway. ps shows all zeroes under SCHED_ULE (as it should then though). I'm just interested.) -- wbr, pluknet From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 03:07:49 2009 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 A580F106564A for ; Thu, 19 Feb 2009 03:07:49 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by mx1.freebsd.org (Postfix) with ESMTP id 78CAD8FC0A for ; Thu, 19 Feb 2009 03:07:49 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: by wf-out-1314.google.com with SMTP id 27so216278wfd.7 for ; Wed, 18 Feb 2009 19:07:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ABVsHrGwtB48bUiEn6JhpxddgohhSpE3d625BZlu/Jg=; b=qlOKbqmbiabMJeaecnSuIInV+vU7FgJYFF4gnt8yt/NItD8+ctxUkjET4wpOcgbLbu ox4rh4sdSEI6BOexnSGZuCJ3me0BZ4SdeDOrpY7kaM2bR41aTySTyL636OCNbi3d9mxF F7X4cwhPzGLF1+ZgomJvrwVyAlIc4JU19qYLg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=RYs2iebt7txXFbVNMSfupvdmnCOj0voiSqDA5+41vvTKiFbi8CuF6rt8+E2rfGnx2v 3KNwq+s7l9WgvASlteNY8J8MOUfxgJ9xiaeM4mf84tjw0m7tcmSNo1Otoey1cDVKN/Zc 5RLSTwDzJ8tMjEOAHqsEZr99uMZj6Gl7XnJlw= MIME-Version: 1.0 Received: by 10.142.186.15 with SMTP id j15mr4003325wff.271.1235011614453; Wed, 18 Feb 2009 18:46:54 -0800 (PST) In-Reply-To: References: Date: Thu, 19 Feb 2009 08:16:54 +0530 Message-ID: <84dead720902181846o7c1ca09fx93fa156d262cc610@mail.gmail.com> From: Joseph Koshy To: =?ISO-8859-2?Q?Nikola_Kne=BEevi=E6?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Obtaining l2 misses and cpu utilization in a module 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, 19 Feb 2009 03:07:49 -0000 > I would like to obtain fore mentioned data from within my module. I need > these performance metrics to see how certain code executes, and make > decisions during the runtime. pmc(3) seems complete, but it also seems to be > intended for use in the userland. > > How to use pmc from modules? Is there any other way? Also, module is amd64 > only, so I don't care about portability. At this point of time there isn't an in-kernel API for using hwpmc(4) (but it is on the task list, see: http://code.google.com/p/pmctools/issues/detail?id=17). For now, you could configure hwpmc(4) to not touch specific PMC registers using the OP_PMCADMIN request (i.e., use pmccontrol -d). After this you can use those registers from your kernel module without interference from hwpmc. Koshy From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 13:48:38 2009 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 0FA92106564A for ; Thu, 19 Feb 2009 13:48:38 +0000 (UTC) (envelope-from laladelausanne@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 8B05D8FC1B for ; Thu, 19 Feb 2009 13:48:37 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: by ug-out-1314.google.com with SMTP id j40so22957ugd.39 for ; Thu, 19 Feb 2009 05:48:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:cc:x-mailer; bh=unYpJALTO+X/ulKXs9jAhIo1nnF5yfNvivjAXwXx8Z0=; b=DVljTDLTAJMYTRYWkQ9u16uwo5Nnf2N1/4tr9dklnWQTHmohMJSi24G81+bLNiPXz+ wp4VsotRYQLmKUYPTOKX+5qVE5Y7voxsUukw8pygV6Q5+WQCNa0EJ0A/vvfuRDRZxzCs lFd2WQyOTdSbSgqcVPi9tetxyUHItXGdB/W5Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:cc:x-mailer; b=OKooxRbKRy9c0qPQVx6+Flks4EyKaEvW+YebE7ExW6O5a+LVQgkw9NMQCLtXl1x6F3 YsDuYmwk6u2pLomd+301dfsiqoB9LWhD2r63HCqAKEmFheq96NHfQTzcYxgIT6wsvjC5 CdzHouD6f3wDoO2l2iIXJTQvdCyakHg+kbHRQ= Received: by 10.210.35.17 with SMTP id i17mr2657297ebi.165.1235051316461; Thu, 19 Feb 2009 05:48:36 -0800 (PST) Received: from ?192.168.1.11? (dyn.144-85-219-084.dsl.vtx.ch [144.85.219.84]) by mx.google.com with ESMTPS id 5sm95648eyf.42.2009.02.19.05.48.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Feb 2009 05:48:36 -0800 (PST) References: <84dead720902181846o7c1ca09fx93fa156d262cc610@mail.gmail.com> <402671A8-53C8-4F24-980B-85519146761E@gmail.com> <84dead720902190315y3dc25bfaj315409988bb5c460@mail.gmail.com> Message-Id: <26699242-E776-4920-A8AE-011BEA4DA18E@gmail.com> From: =?UTF-8?Q?Nikola_Kne=C5=BEevi=C4=87?= To: Joseph Koshy In-Reply-To: <84dead720902190315y3dc25bfaj315409988bb5c460@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Thu, 19 Feb 2009 14:48:34 +0100 X-Mailer: Apple Mail (2.930.3) Cc: freebsd-hackers@freebsd.org Subject: Re: Obtaining l2 misses and cpu utilization in a module 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, 19 Feb 2009 13:48:38 -0000 On 19 Feb 2009, at 12:15 , Joseph Koshy wrote: >> % pmccontrol -L >> pmccontrol: Initialization of the pmc(3) library failed: No such >> file or >> directory. > > Did you load hwpmc(4) into the kernel? > How can I check that? kldload pmc reports that pmc interface exists in kernel. pmc: Unknown Intel CPU. module_register_init: MOD_LOAD (hwpmc, 0xffffffff804ae160, 0xffffffff809c4c60) error 78 WARNING: WITNESS option enabled, expect reduced performance. cd3 at umass-sim3 bus 3 target 0 lun 0 cd3: Removable CD-ROM SCSI-3 device cd3: 40.000MB/s transfers cd3: Attempt to query device size failed: NOT READY, Medium not present cd0 at umass-sim0 bus 0 target 0 lun 0 cd0: Removable CD-ROM SCSI-3 device cd0: 40.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present cd1 at umass-sim1 bus 1 target 0 lun 0 cd1: Removable CD-ROM SCSI-3 device cd1: 40.000MB/s transfers cd1: Attempt to query device size failed: NOT READY, Medium not present cd2 at umass-sim2 bus 2 target 0 lun 0 cd2: Removable CD-ROM SCSI-3 device cd2: 40.000MB/s transfers cd2: Attempt to query device size failed: NOT READY, Medium not present Trying to mount root from ufs:/dev/ad4s1a ipfw2 (+ipv6) initialized, divert loadable, nat loadable, rule-based forwarding disabled, default to deny, logging disabled interface pmc.33554432 already present in the KLD 'kernel'! kldload: /boot/kernel/hwpmc.ko: Unsupported file type > Model 10676H should be supported in -current. If you are running 7.X > you can find a patch by Fabien at wiki.freebsd.org/PmcTools. I've applied only . Should I apply the other one? My system is: FreeBSD nslrack54.epfl.ch 7.1-RELEASE-p2 FreeBSD 7.1-RELEASE-p2 #12 Cheers, Nikola From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 21:17:30 2009 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 0D625106566C for ; Thu, 19 Feb 2009 21:17:30 +0000 (UTC) (envelope-from mail@sebastianstumpf.de) Received: from ipx10412.ipxserver.de (spicecastle.net [212.112.237.177]) by mx1.freebsd.org (Postfix) with ESMTP id BE2258FC16 for ; Thu, 19 Feb 2009 21:17:29 +0000 (UTC) (envelope-from mail@sebastianstumpf.de) Received: by ipx10412.ipxserver.de (Postfix, from userid 5000) id DE2F6FFB1C; Thu, 19 Feb 2009 21:55:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on ipx10412.ipxserver.de X-Spam-Level: X-Spam-Status: No, score=0.4 required=3.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=no version=3.2.3 Received: from elysium (pD9E4706F.dip.t-dialin.net [217.228.112.111]) by ipx10412.ipxserver.de (Postfix) with ESMTP id D0009FF864 for ; Thu, 19 Feb 2009 21:55:24 +0100 (CET) Date: Thu, 19 Feb 2009 21:55:19 +0100 From: Sebastian Stumpf To: hackers@freebsd.org Message-ID: <20090219205519.GA5161@sebastianstumpf.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline Priority: normal X-Editor: vim 7.1 User-Agent: mutt-ng/devel-r804 (FreeBSD 7.1-STABLE) Cc: Subject: gbde and missing lock files 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, 19 Feb 2009 21:17:30 -0000 --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. I've got a small GEOM_BDE setup at my computer. I used gbde to encrypt ad4s1e and stored its lock file under=20 /etc/gbde/ad4s1e.lock. Accidently I deleted this file via a=20 cronjob. I know that the lock file only stores the lock sector position on the disk. I've still got my password. I've read a bit through src/sbin/geom, but I don't think that I'm skilled enough to write a hack that will try every sector with my password and call fsck to check for a valid ufs filesystem.=20 I'm watching this list for quite some time now and I know that there are some people out there how could help me with this little brute=20 force problem in a few minutes by putting together a small hack/patch. And yes: Of course there was a backup of the lock file. But guess=20 where... I'd be very grateful if somebody could help me mounting this filesystem one more time. :-) Cheers, Sebastian --=20 VI VI VI - The editor of the beast. - perlhacker.org --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkmdxzcACgkQUCsAQC4AUriAWQCfW/BSFSYoA+D6JjoWQJTyH8WT itQAoMYKKDl4iMApk1TQB8X5FsFhD+La =k0Ec -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ-- From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 21:34:09 2009 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 ADA501065672 for ; Thu, 19 Feb 2009 21:34:09 +0000 (UTC) (envelope-from mail@sebastianstumpf.de) Received: from ipx10412.ipxserver.de (spicecastle.net [212.112.237.177]) by mx1.freebsd.org (Postfix) with ESMTP id 699FD8FC18 for ; Thu, 19 Feb 2009 21:34:09 +0000 (UTC) (envelope-from mail@sebastianstumpf.de) Received: by ipx10412.ipxserver.de (Postfix, from userid 5000) id EEA30FFB41; Thu, 19 Feb 2009 22:00:49 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on ipx10412.ipxserver.de X-Spam-Level: X-Spam-Status: No, score=0.4 required=3.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=no version=3.2.3 Received: from elysium (pD9E4706F.dip.t-dialin.net [217.228.112.111]) by ipx10412.ipxserver.de (Postfix) with ESMTP id 1293BFF864 for ; Thu, 19 Feb 2009 22:00:47 +0100 (CET) Date: Thu, 19 Feb 2009 22:00:42 +0100 From: Sebastian Stumpf To: freebsd-hackers@freebsd.org Message-ID: <20090219210041.GA5299@sebastianstumpf.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DocE+STaALJfprDB" Content-Disposition: inline Priority: normal X-Editor: vim 7.1 User-Agent: mutt-ng/devel-r804 (FreeBSD 7.1-STABLE) Subject: gbde and missing lock file 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, 19 Feb 2009 21:34:09 -0000 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. I've got a small GEOM_BDE setup at my computer. I used gbde to encrypt ad4s1e and stored its lock file under=20 /etc/gbde/ad4s1e.lock. Accidently I deleted this file via a=20 cronjob. I know that the lock file only stores the lock sector position on the disk. I've still got my password. I've read a bit through src/sbin/geom, but I don't think that I'm skilled enough to write a hack that will try every sector with my password and call fsck to check for a valid ufs filesystem.=20 I'm watching this list for quite some time now and I know that there are some people out there how could help me with this little brute=20 force problem in a few minutes by putting together a small hack/patch. And yes: Of course there was a backup of the lock file. But guess=20 where... I'd be very grateful if somebody could help me mounting this filesystem one more time. :-) Cheers, Sebastian --=20 VI VI VI - The editor of the beast. - perlhacker.org --DocE+STaALJfprDB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkmdyHkACgkQUCsAQC4AUrjG4ACfR+oHbRkDA6OQL7EZN+9RmO0J Y8YAn2Q15uk+PGJjRR0xhBJWpYkGW32E =lIke -----END PGP SIGNATURE----- --DocE+STaALJfprDB-- From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 20 16:45:31 2009 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 DD49F106564A for ; Fri, 20 Feb 2009 16:45:31 +0000 (UTC) (envelope-from fernando.apesteguia@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 6F8918FC0A for ; Fri, 20 Feb 2009 16:45:31 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by ey-out-2122.google.com with SMTP id d26so96914eyd.7 for ; Fri, 20 Feb 2009 08:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=KKAIE5XFuCXQm1ZK4fmTWTWvY9UYIOwbMNN5HRdFJCw=; b=bNTLS+qukOoAW4+GPJ11i+CLR6jhphk+s5hoLZBxVz4m1QARYkTA5IzAlHaf7BsonQ F4Y7f/qBOsRI/hInbAR4o1UsvW1doNYevIMto1ARbNOk/4DszO7QOKbsAi8uaIj74X6W LnjfYvynP0F2UP7dVQ1bfVUMuE5tgSDDhRcIg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=PVGPgEp8t4Dmrz5tvNUEai6V/G0WxaI7bV9E0Z3Dqgm6rDL8zbvfilhA+6I6+ZPlgw J+Q2OPlAQ8858Uhi/SdFku9Z9HMjH9u/B8oDcNNn+jvBAXEFFGmzd2OMqp4KtLaNTkHF 0LSXUNs3/A+rWWW38seV71iUxTEEKJRfl7zx8= MIME-Version: 1.0 Received: by 10.210.18.8 with SMTP id 8mr740953ebr.183.1235147127229; Fri, 20 Feb 2009 08:25:27 -0800 (PST) Date: Fri, 20 Feb 2009 17:25:26 +0100 Message-ID: <1bd550a00902200825w3f225d0at99cfd1c6bb63ea0@mail.gmail.com> From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= To: FreeBSD Hackers Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: FBSD 7.0-p3 NIC driver problem (Realtek) 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, 20 Feb 2009 16:45:32 -0000 Hi all, I copy here the mail I sent to freebsd-questions cause I didn't get any answers: Yesterday I updated to 7.1-p3 on AMD64 arch. Since then, the NIC is not detected anymore. ifconfig doesn't show it and I can't connect to the Internet. There were well-known issues with this NIC model before, (http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2008-11/msg00299.html) but the weird thing is that it seemed to be fine with 7.1-RELEASE and newer till this -p3. It doesn't recognize the card in 4/5 boot sequences (really annoying). Anybody with this problem? Thanks in advance. From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 20 18:40:35 2009 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 0C608106566C for ; Fri, 20 Feb 2009 18:40:35 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id BC0678FC1A for ; Fri, 20 Feb 2009 18:40:34 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.3/8.14.3) with ESMTP id n1KIFcj3024813; Fri, 20 Feb 2009 11:15:38 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.3/8.14.3/Submit) with ESMTP id n1KIFcNu024810; Fri, 20 Feb 2009 11:15:38 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Fri, 20 Feb 2009 11:15:38 -0700 (MST) From: Warren Block To: =?ISO-8859-15?Q?Fernando_Apestegu=EDa?= In-Reply-To: <1bd550a00902200825w3f225d0at99cfd1c6bb63ea0@mail.gmail.com> Message-ID: References: <1bd550a00902200825w3f225d0at99cfd1c6bb63ea0@mail.gmail.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (wonkity.com [127.0.0.1]); Fri, 20 Feb 2009 11:15:38 -0700 (MST) Cc: FreeBSD Hackers Subject: Re: FBSD 7.0-p3 NIC driver problem (Realtek) 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, 20 Feb 2009 18:40:35 -0000 On Fri, 20 Feb 2009, Fernando Apestegu?a wrote: > Yesterday I updated to 7.1-p3 on AMD64 arch. > > Since then, the NIC is not detected anymore. ifconfig doesn't show it > and I can't connect to the Internet. > > There were well-known issues with this NIC model before, > (http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2008-11/msg00299.html) > but the weird thing is that it seemed to be fine with > 7.1-RELEASE and newer till this -p3. Please identify the NIC more precisely with pciconf -lv | grep -B2 Ethernet > It doesn't recognize the card in 4/5 boot sequences (really annoying). > > Anybody with this problem? If you can do 'ifconfig re0' and then the NIC is active, see this: http://www.freebsd.org/cgi/query-pr.cgi?pr=130586&cat= -Warren Block * Rapid City, South Dakota USA From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 20 19:05:37 2009 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 B1C141065687 for ; Fri, 20 Feb 2009 19:05:37 +0000 (UTC) (envelope-from fernando.apesteguia@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 41DDA8FC22 for ; Fri, 20 Feb 2009 19:05:36 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by ug-out-1314.google.com with SMTP id j40so75493ugd.39 for ; Fri, 20 Feb 2009 11:05:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=4/xXICI8/buBwVhgsI+8oBVyTGI5CDZlUfIKr4bH8UA=; b=DN3V8xMVQXmiShM/zTYZt82V7SHlwJAlFqNu64BtC0dlZhXxOLy5mRVqTmdE+rTu8E hrlsS8yDKccCytQ+eHodpn76m11LJgyB2B8648xN2a/CTW6Wyrwjo1AlKMPwjwRHhpO5 caVCpp0wYkErU+xBonu3u1PjYjEhhvO32vkaA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=kFiTaF8LnwOeG9SkavVZUmITq6iGx6O0RGyQD0czeUvu18ZTEW2TFAYfa82eAZx2QS zqgDi0TGVBZrE+kJ39MLxRnVFFPmShOhc2H0Uz0pggS6DcI77JBr18fnGBDbh/1Xhc// zDTK42YqvSmn9Nqh6/YiSivpgUwAgxgiD+QIY= MIME-Version: 1.0 Received: by 10.210.92.11 with SMTP id p11mr880838ebb.24.1235156736165; Fri, 20 Feb 2009 11:05:36 -0800 (PST) In-Reply-To: References: <1bd550a00902200825w3f225d0at99cfd1c6bb63ea0@mail.gmail.com> Date: Fri, 20 Feb 2009 20:05:36 +0100 Message-ID: <1bd550a00902201105v3a893450x21e3001185d39283@mail.gmail.com> From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= To: Warren Block Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers Subject: Re: FBSD 7.0-p3 NIC driver problem (Realtek) 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, 20 Feb 2009 19:05:38 -0000 On Fri, Feb 20, 2009 at 7:15 PM, Warren Block wrote: > On Fri, 20 Feb 2009, Fernando Apestegu?a wrote: > >> Yesterday I updated to 7.1-p3 on AMD64 arch. >> >> Since then, the NIC is not detected anymore. ifconfig doesn't show it >> and I can't connect to the Internet. >> >> There were well-known issues with this NIC model before, >> >> (http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2008-11/msg00299.html) >> but the weird thing is that it seemed to be fine with >> 7.1-RELEASE and newer till this -p3. > > Please identify the NIC more precisely with > > pciconf -lv | grep -B2 Ethernet re0@pci0:2:0:0: class=0x020000 card=0x2a6f103c chip=0x816810ec rev=0x02 hdr=0x00 vendor = 'Realtek Semiconductor' device = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC' > >> It doesn't recognize the card in 4/5 boot sequences (really annoying). >> >> Anybody with this problem? > > If you can do 'ifconfig re0' and then the NIC is active, see this: No, I can't. The re0 interface is not present. After executing the command it is still missing. Thanks for the help. Should you need more information or me doing some tests, just tell me. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=130586&cat= > > -Warren Block * Rapid City, South Dakota USA > From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 21 02:17:23 2009 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 1FD84106566B for ; Sat, 21 Feb 2009 02:17:23 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.188]) by mx1.freebsd.org (Postfix) with ESMTP id AB3D18FC1C for ; Sat, 21 Feb 2009 02:17:22 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by ti-out-0910.google.com with SMTP id a1so776645tib.3 for ; Fri, 20 Feb 2009 18:17:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=g4ekDVrkWjy1cUKx+7wFxlZryqvejJ6aklRCXf7Z8AI=; b=fNjN6DPYqQQSO10IUbUqeRoT3Aw3c4txm5OxT+il1rTpcwhu6Uht9+QX0pC9PTkqVh 4oWxiW6+mDD7ArYi3wBjNAu+WGS97TS00j76FEJLwW+3MmOq/+BOhB0ya7JFVbFyq4vk ivVItDTeEQ9TXZrWUS9JJErrVJ2FNthWEvJMw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=iPGQPy2NINZh3S5fgRa6quWQNs1O/u23o2VtDgyBGPctNhgJHEAIjYdd0Vhtcr2dS/ P/Ur+a1YYN3AWXkl2cUwB5duANBxbxoizR67GmE7XJBRwneGN6rqzTq7pJI1/E68Rylk ePEYfLMF3hj/dEztSMWVnpHizPet2KfWWEvEE= Received: by 10.110.62.4 with SMTP id k4mr1925740tia.52.1235181049731; Fri, 20 Feb 2009 17:50:49 -0800 (PST) Received: from michelle.cdnetworks.co.kr ([114.111.62.249]) by mx.google.com with ESMTPS id b4sm2401392tic.16.2009.02.20.17.50.46 (version=SSLv3 cipher=RC4-MD5); Fri, 20 Feb 2009 17:50:47 -0800 (PST) Received: by michelle.cdnetworks.co.kr (sSMTP sendmail emulation); Sat, 21 Feb 2009 10:55:18 +0900 From: Pyun YongHyeon Date: Sat, 21 Feb 2009 10:55:18 +0900 To: Fernando Apestegu?a Message-ID: <20090221015518.GA44336@michelle.cdnetworks.co.kr> References: <1bd550a00902200825w3f225d0at99cfd1c6bb63ea0@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1bd550a00902200825w3f225d0at99cfd1c6bb63ea0@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Cc: FreeBSD Hackers Subject: Re: FBSD 7.0-p3 NIC driver problem (Realtek) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2009 02:17:23 -0000 On Fri, Feb 20, 2009 at 05:25:26PM +0100, Fernando Apestegu?a wrote: > Hi all, > > I copy here the mail I sent to freebsd-questions cause I didn't get any answers: > > > Yesterday I updated to 7.1-p3 on AMD64 arch. > > Since then, the NIC is not detected anymore. ifconfig doesn't show it > and I can't connect to the Internet. > > There were well-known issues with this NIC model before, > (http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2008-11/msg00299.html) > but the weird thing is that it seemed to be fine with > 7.1-RELEASE and newer till this -p3. > > It doesn't recognize the card in 4/5 boot sequences (really annoying). > > Anybody with this problem? I'm not sure you're suffering from MAC power saving issue of RealTek PCIe controller. Sometimes re(4) used to fail to wakeup the controller which in turn resulted in 'no driver' for the controller. If this is the case you can see "MII without any phy!" message in dmesg output. r188358(cvs if_re.c 1.95.2.40) should fix the issue so please try latest 7-stable or copy if_re.c, if_rlreg.h and if_rl.c from HEAD/ 7-stable to your 7.1-RELEASE box and rebuild kernel. If you still see the same issue please let me know. Btw, stable@ is more appropriate list for this type of issues. From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 21 18:09:46 2009 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 B8EED106564A for ; Sat, 21 Feb 2009 18:09:46 +0000 (UTC) (envelope-from fergus@cobbled.net) Received: from mail1.slb.deg.dub.stisp.net (mail1.slb.deg.dub.stisp.net [84.203.253.98]) by mx1.freebsd.org (Postfix) with SMTP id C298F8FC18 for ; Sat, 21 Feb 2009 18:09:45 +0000 (UTC) (envelope-from fergus@cobbled.net) Received: (qmail 5442 invoked from network); 21 Feb 2009 18:09:43 -0000 Received: from unknown (HELO holyman.cobbled.net) (84.203.180.117) by mail1.slb.deg.dub.stisp.net with SMTP; 21 Feb 2009 18:09:43 -0000 Received: by holyman.cobbled.net (Postfix, from userid 16385) id F31331031D; Sat, 21 Feb 2009 18:09:42 +0000 (UTC) Date: Fri, 13 Feb 2009 11:54:26 +0000 From: ttw+bsd@cobbled.net To: hackers@freebsd.org Message-ID: <20090213115426.GA15211@holyman.cobbled.net> Mail-Followup-To: hackers@freebsd.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="jRHKVT23PllUwdXP" Content-Disposition: inline Resent-From: ttw@cobbled.net Resent-Date: Sat, 21 Feb 2009 18:09:42 +0000 Resent-To: hackers@freebsd.org Resent-Message-Id: <20090221180942.F31331031D@holyman.cobbled.net> Cc: Subject: removal of NGROUPS_MAX dependancy from base 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, 21 Feb 2009 18:09:47 -0000 --jRHKVT23PllUwdXP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline attached is the first in a series of patches that is intended to remove the current limitation on group membership. this patch should remove the dependancy on the definition of NGROUPS_MAX as a static constant and implement it as a writable sysconf variable of the same. it should also make the necessary changes to the codebase to support those. i need some guidance as to what i should re-define NGROUPS_MAX to be (so that code that depends on it can continue to operate, i'm thinking just make it 16 but perhaps it would be worth extending the default while we're at it to something like 64??). i also need feedback on any braindamage in the current changes. the next step will be to extend the kernel groups and map them back to the user structs / calls. finally i'll extend the user groups and implement those calls. nb: not tested the code (it builds) ... was intending to test it on my XEN box but only just realised that Xen on amd64 isn't working. :-( happy for any questions that may help guide the process. --jRHKVT23PllUwdXP Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="remove-ngroups_max,v1r2.patch" Index: contrib/openpam/lib/openpam_borrow_cred.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/contrib/openpam/lib/openpam_borrow_cred.c,v retrieving revision 1.1.1.9 diff -b -u -r1.1.1.9 openpam_borrow_cred.c --- contrib/openpam/lib/openpam_borrow_cred.c 21 Dec 2007 11:49:29 -0000 1.1.1.9 +++ contrib/openpam/lib/openpam_borrow_cred.c 4 Feb 2009 16:38:46 -0000 @@ -60,6 +60,7 @@ struct pam_saved_cred *scred; const void *scredp; int r; + int ngroups ; ENTERI(pwd->pw_uid); r = pam_get_data(pamh, PAM_SAVED_CRED, &scredp); @@ -73,26 +74,55 @@ (int)geteuid()); RETURNC(PAM_PERM_DENIED); } - scred = calloc(1, sizeof *scred); - if (scred == NULL) - RETURNC(PAM_BUF_ERR); - scred->euid = geteuid(); - scred->egid = getegid(); - r = getgroups(NGROUPS_MAX, scred->groups); - if (r < 0) { - FREE(scred); - RETURNC(PAM_SYSTEM_ERR); - } - scred->ngroups = r; +/* get the maximum number of system groups */ +#if _POSIX_VERSION > 199212 + ngroups = sysconf( _SC_NGROUPS_MAX ) ; +#elif defined(NGROUPS_MAX) + ngroups = NGROUPS_MAX ; +#else + ngroups = _NGROUPS_COMPAT ; +#endif +/* initally allocate enough memory for max_groups */ + scred = malloc( sizeof(struct pam_saved_cred) + + ngroups*sizeof(gid_t) ) ; + if( scred == NULL ) + RETURNC( PAM_BUF_ERR ) ; +/* set the save values */ + scred->euid = geteuid() ; + scred->egid = getegid() ; +/* save groups into our (probably) oversized memory allocation */ + r = getgroups( ngroups, scred->groups ) ; + if( r < 0 ) { + FREE( scred ) ; /* call PAM's free macro */ + RETURNC( PAM_SYSTEM_ERR ) ; + } ; + scred->ngroups = r ; + ngroups = r < ngroups ? r : ngroups ; /* choose the smallest */ + /* ... number of groups to allocate */ + ngroups = ngroups < _NGROUPS_COMPAT ? ngroups : _NGROUPS_COMPAT ; + /* but keep it within expected minimum value */ + /* XXX: we don't really want this but until we get + * educated on the implications this is probably safe + * and certainaly compatible */ +/* realloc, releasing unneeded memory */ + scred = realloc( (void*)scred, + sizeof(struct pam_saved_cred)+ngroups*sizeof(gid_t) ) ; + /* nb: we ignore failure and try to store the larger + * ... structure as initially requested. catching the + * ... error in 'pam_set_data' if neccessary. */ +/* save the credentials to PAM user data area */ r = pam_set_data(pamh, PAM_SAVED_CRED, scred, &openpam_free_data); if (r != PAM_SUCCESS) { FREE(scred); RETURNC(r); } +/* set the new credentials */ if (geteuid() == pwd->pw_uid) RETURNC(PAM_SUCCESS); if (initgroups(pwd->pw_name, pwd->pw_gid) < 0 || - setegid(pwd->pw_gid) < 0 || seteuid(pwd->pw_uid) < 0) { + setegid(pwd->pw_gid) < 0 || seteuid(pwd->pw_uid) < 0) + { + /* if any of the set calls failed, then restore and fail */ openpam_restore_cred(pamh); RETURNC(PAM_SYSTEM_ERR); } Index: contrib/openpam/lib/openpam_impl.h =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/contrib/openpam/lib/openpam_impl.h,v retrieving revision 1.1.1.17 diff -b -u -r1.1.1.17 openpam_impl.h --- contrib/openpam/lib/openpam_impl.h 21 Dec 2007 11:49:29 -0000 1.1.1.17 +++ contrib/openpam/lib/openpam_impl.h 5 Feb 2009 15:41:19 -0000 @@ -110,13 +110,17 @@ int env_size; }; -#ifdef NGROUPS_MAX +#if _POSIX_VERSION > 199212 #define PAM_SAVED_CRED "pam_saved_cred" struct pam_saved_cred { uid_t euid; gid_t egid; - gid_t groups[NGROUPS_MAX]; int ngroups; + gid_t groups[]; + /* keep this last so that we can simply + .. over-allocate the amount of space + .. nb: don't use sizeof' unless you adjust + .. for the number of groups */ }; #endif Index: include/rpc/auth_unix.h =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/include/rpc/auth_unix.h,v retrieving revision 1.11 diff -b -u -r1.11 auth_unix.h --- include/rpc/auth_unix.h 23 Mar 2002 17:24:55 -0000 1.11 +++ include/rpc/auth_unix.h 14 Jan 2009 11:15:21 -0000 @@ -52,7 +52,7 @@ #define MAX_MACHINE_NAME 255 /* gids compose part of a credential; there may not be more than 16 of them */ -#define NGRPS 16 +#define AUTH_UNIX_NGROUPS 16 /* * Unix style credentials. Index: lib/libc/rpc/auth_unix.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/lib/libc/rpc/auth_unix.c,v retrieving revision 1.18 diff -b -u -r1.18 auth_unix.c --- lib/libc/rpc/auth_unix.c 14 Jun 2007 20:07:35 -0000 1.18 +++ lib/libc/rpc/auth_unix.c 4 Feb 2009 15:31:57 -0000 @@ -182,27 +182,48 @@ * Returns an auth handle with parameters determined by doing lots of * syscalls. */ -AUTH * +AUTH* authunix_create_default() { - int len; char machname[MAXHOSTNAMELEN + 1]; + AUTH* auth_unix ; uid_t uid; gid_t gid; - gid_t gids[NGROUPS_MAX]; - - if (gethostname(machname, sizeof machname) == -1) - abort(); - machname[sizeof(machname) - 1] = 0; + gid_t *gids ; + uint ngroups ; + uint max_ngroups ; + +/* get hostname or fail */ + if( gethostname(machname,sizeof(machname)) == -1 ) + abort() ; + machname[sizeof(machname)-1] = 0 ; /* add a null terminator */ +/* set uid/gid from current effective values */ uid = geteuid(); gid = getegid(); - if ((len = getgroups(NGROUPS_MAX, gids)) < 0) - abort(); - if (len > NGRPS) - len = NGRPS; - /* XXX: interface problem; those should all have been unsigned */ - return (authunix_create(machname, (int)uid, (int)gid, len, - (int *)gids)); +/* set the group set */ +#if _POSIX_VERSION > 199212 + max_ngroups = sysconf( _SC_NGROUPS_MAX ) ; +#elif defined(NGROUPS_MAX) + max_ngroups = NGROUPS_MAX ; +#else + max_ngroups = 16 ; +#endif + gids = (gid_t*)calloc( max_ngroups, sizeof(gid_t) ) ; + if( gids == NULL ) + abort () ; + if( (ngroups=getgroups(max_ngroups,gids)) < 0 ) { + free( gids ) ; + abort() ; + } +/* clip the groups to a transmissable size */ + if( ngroups > AUTH_UNIX_NGROUPS ) + ngroups = AUTH_UNIX_NGROUPS ; +/* XXX: interface problem; those should all have been unsigned */ + auth_unix = authunix_create( machname, + (int)uid, (int)gid, (int)ngroups, + (int*)gids ) ; + free( (void*)gids ) ; + return( auth_unix ) ; } /* Index: lib/libc/rpc/authunix_prot.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/lib/libc/rpc/authunix_prot.c,v retrieving revision 1.10 diff -b -u -r1.10 authunix_prot.c --- lib/libc/rpc/authunix_prot.c 20 Nov 2007 01:51:20 -0000 1.10 +++ lib/libc/rpc/authunix_prot.c 4 Feb 2009 16:03:29 -0000 @@ -67,13 +67,14 @@ paup_gids = &p->aup_gids; - if (xdr_u_long(xdrs, &(p->aup_time)) - && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) - && xdr_int(xdrs, &(p->aup_uid)) - && xdr_int(xdrs, &(p->aup_gid)) - && xdr_array(xdrs, (char **) paup_gids, - &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { - return (TRUE); + if( xdr_u_long(xdrs,&(p->aup_time)) && + xdr_string(xdrs,&(p->aup_machname),MAX_MACHINE_NAME) && + xdr_int(xdrs,&(p->aup_uid)) && + xdr_int(xdrs,&(p->aup_gid)) && + xdr_array(xdrs,(char**)paup_gids,&(p->aup_len), + AUTH_UNIX_NGROUPS,sizeof(int),(xdrproc_t)xdr_int) ) + { + return( TRUE ) ; } - return (FALSE); + return( FALSE ) ; } Index: lib/libc/rpc/netname.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/lib/libc/rpc/netname.c,v retrieving revision 1.8 diff -b -u -r1.8 netname.c --- lib/libc/rpc/netname.c 16 Oct 2004 06:11:35 -0000 1.8 +++ lib/libc/rpc/netname.c 14 Jan 2009 01:29:47 -0000 @@ -61,6 +61,7 @@ #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 256 #endif + #ifndef NGROUPS #define NGROUPS 16 #endif Index: lib/libc/rpc/netnamer.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/lib/libc/rpc/netnamer.c,v retrieving revision 1.12 diff -b -u -r1.12 netnamer.c --- lib/libc/rpc/netnamer.c 10 Mar 2005 00:58:21 -0000 1.12 +++ lib/libc/rpc/netnamer.c 3 Feb 2009 17:55:48 -0000 @@ -69,7 +69,6 @@ #ifndef NGROUPS #define NGROUPS 16 #endif - /* * Convert network-name into unix credential */ @@ -104,7 +103,7 @@ return (0); } *gidp = (gid_t) atol(p); - for (gidlen = 0; gidlen < NGROUPS; gidlen++) { + for (gidlen = 0; gidlen < _NGROUPS_RPC_MAX; gidlen++) { p = strsep(&res, "\n,"); if (p == NULL) break; @@ -157,7 +156,7 @@ static int _getgroups(uname, groups) char *uname; - gid_t groups[NGROUPS]; + gid_t groups[_NGROUPS_RPC_MAX]; { gid_t ngroups = 0; struct group *grp; @@ -169,10 +168,11 @@ while ((grp = getgrent())) { for (i = 0; grp->gr_mem[i]; i++) if (!strcmp(grp->gr_mem[i], uname)) { - if (ngroups == NGROUPS) { + if( ngroups == _NGROUPS_RPC_MAX ) { #ifdef DEBUG - fprintf(stderr, - "initgroups: %s is in too many groups\n", uname); + fprintf( stderr, + "initgroups: %s is in too many groups\n", + uname ) ; #endif goto toomany; } Index: lib/libc/rpc/svc_auth_des.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/lib/libc/rpc/svc_auth_des.c,v retrieving revision 1.9 diff -b -u -r1.9 svc_auth_des.c --- lib/libc/rpc/svc_auth_des.c 22 Mar 2002 23:18:37 -0000 1.9 +++ lib/libc/rpc/svc_auth_des.c 3 Feb 2009 17:51:01 -0000 @@ -452,7 +452,7 @@ short uid; /* cached uid */ short gid; /* cached gid */ short grouplen; /* length of cached groups */ - short groups[NGROUPS]; /* cached groups */ + short groups[_NGROUPS_RPC_MAX]; /* cached groups */ }; /* Index: lib/libc/rpc/svc_auth_unix.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/lib/libc/rpc/svc_auth_unix.c,v retrieving revision 1.11 diff -b -u -r1.11 svc_auth_unix.c --- lib/libc/rpc/svc_auth_unix.c 16 Oct 2004 06:11:35 -0000 1.11 +++ lib/libc/rpc/svc_auth_unix.c 4 Feb 2009 16:04:10 -0000 @@ -68,7 +68,7 @@ struct area { struct authunix_parms area_aup; char area_machname[MAX_MACHINE_NAME+1]; - int area_gids[NGRPS]; + int area_gids[AUTH_UNIX_NGROUPS] ; } *area; u_int auth_len; size_t str_len, gid_len; @@ -98,7 +98,7 @@ aup->aup_uid = (int)IXDR_GET_INT32(buf); aup->aup_gid = (int)IXDR_GET_INT32(buf); gid_len = (size_t)IXDR_GET_U_INT32(buf); - if (gid_len > NGRPS) { + if( gid_len > AUTH_UNIX_NGROUPS ) { stat = AUTH_BADCRED; goto done; } Index: lib/librpcsec_gss/svc_rpcsec_gss.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/lib/librpcsec_gss/svc_rpcsec_gss.c,v retrieving revision 1.4 diff -b -u -r1.4 svc_rpcsec_gss.c --- lib/librpcsec_gss/svc_rpcsec_gss.c 3 Nov 2008 10:38:00 -0000 1.4 +++ lib/librpcsec_gss/svc_rpcsec_gss.c 5 Feb 2009 16:09:37 -0000 @@ -127,7 +127,7 @@ rpc_gss_ucred_t cl_ucred; /* unix-style credentials */ bool_t cl_done_callback; /* TRUE after call */ void *cl_cookie; /* user cookie from callback */ - gid_t cl_gid_storage[NGRPS]; + gid_t cl_gid_storage[AUTH_UNIX_NGROUPS]; gss_OID cl_mech; /* mechanism */ gss_qop_t cl_qop; /* quality of protection */ u_int cl_seq; /* current sequence number */ @@ -578,7 +578,7 @@ getpwuid_r(uid, &pwd, buf, sizeof(buf), &pw); if (pw) { - int len = NGRPS; + int len = AUTH_UNIX_NGROUPS; uc->uid = pw->pw_uid; uc->gid = pw->pw_gid; uc->gidlist = client->cl_gid_storage; Index: sys/compat/svr4/svr4_misc.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/sys/compat/svr4/svr4_misc.c,v retrieving revision 1.101 diff -b -u -r1.101 svr4_misc.c --- sys/compat/svr4/svr4_misc.c 21 Apr 2008 21:24:08 -0000 1.101 +++ sys/compat/svr4/svr4_misc.c 14 Jan 2009 11:58:47 -0000 @@ -710,7 +710,12 @@ *retval = 0; break; case SVR4_CONFIG_NGROUPS: - *retval = NGROUPS_MAX; + *retval = _NGROUPS_COMPAT; + /* XXX: this should pull the value + * from sysctl but i cannot find + * the definitions for the similar + * varaibles here (i.e. 'maxproc') + */ break; case SVR4_CONFIG_CHILD_MAX: *retval = maxproc; Index: sys/fs/portalfs/portal.h =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/sys/fs/portalfs/portal.h,v retrieving revision 1.10 diff -b -u -r1.10 portal.h --- sys/fs/portalfs/portal.h 6 Jan 2005 18:10:40 -0000 1.10 +++ sys/fs/portalfs/portal.h 16 Jan 2009 23:44:50 -0000 @@ -43,7 +43,7 @@ int pcr_flag; /* File open mode */ uid_t pcr_uid; /* From ucred */ short pcr_ngroups; /* From ucred */ - gid_t pcr_groups[NGROUPS]; /* From ucred */ + gid_t pcr_groups[_NGROUPS_COMPAT]; /* From ucred */ }; #ifdef _KERNEL Index: sys/i386/ibcs2/ibcs2_misc.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/sys/i386/ibcs2/ibcs2_misc.c,v retrieving revision 1.70 diff -b -u -r1.70 ibcs2_misc.c --- sys/i386/ibcs2/ibcs2_misc.c 13 Jan 2008 14:44:07 -0000 1.70 +++ sys/i386/ibcs2/ibcs2_misc.c 14 Jan 2009 12:24:56 -0000 @@ -659,14 +659,14 @@ struct thread *td; struct ibcs2_getgroups_args *uap; { - ibcs2_gid_t iset[NGROUPS_MAX]; - gid_t gp[NGROUPS_MAX]; + ibcs2_gid_t iset[_NGROUPS_COMPAT]; + gid_t gp[_NGROUPS_COMPAT]; u_int i, ngrp; int error; if (uap->gidsetsize < 0) return (EINVAL); - ngrp = MIN(uap->gidsetsize, NGROUPS_MAX); + ngrp = MIN(uap->gidsetsize, _NGROUPS_COMPAT); error = kern_getgroups(td, &ngrp, gp); if (error) return (error); @@ -685,11 +685,11 @@ struct thread *td; struct ibcs2_setgroups_args *uap; { - ibcs2_gid_t iset[NGROUPS_MAX]; - gid_t gp[NGROUPS_MAX]; + ibcs2_gid_t iset[_NGROUPS_COMPAT]; + gid_t gp[_NGROUPS_COMPAT]; int error, i; - if (uap->gidsetsize < 0 || uap->gidsetsize > NGROUPS_MAX) + if (uap->gidsetsize < 0 || uap->gidsetsize > _NGROUPS_COMPAT) return (EINVAL); if (uap->gidsetsize && uap->gidset) { error = copyin(uap->gidset, iset, sizeof(ibcs2_gid_t) * @@ -789,8 +789,13 @@ return 0; case IBCS2_SC_NGROUPS_MAX: - mib[1] = KERN_NGROUPS; - break; + /* XXX: IBCS2 compat with group limits not known to + * me, so i'll just return a compatibile/safe limit + * for now */ + PROC_LOCK(p) ; + td->td_retval[0] = _NGROUPS_COMPAT ; + PROC_UNLOCK(p) ; + return( 0 ) ; case IBCS2_SC_OPEN_MAX: PROC_LOCK(p); Index: sys/kern/kern_mib.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/sys/kern/kern_mib.c,v retrieving revision 1.93 diff -b -u -r1.93 kern_mib.c --- sys/kern/kern_mib.c 28 Jan 2009 19:58:05 -0000 1.93 +++ sys/kern/kern_mib.c 4 Feb 2009 13:15:06 -0000 @@ -124,8 +124,8 @@ SYSCTL_INT(_kern, KERN_POSIX1, posix1version, CTLFLAG_RD, 0, _POSIX_VERSION, "Version of POSIX attempting to comply to"); -SYSCTL_INT(_kern, KERN_NGROUPS, ngroups, CTLFLAG_RD, - 0, NGROUPS_MAX, "Maximum number of groups a user can belong to"); +SYSCTL_INT(_kern, KERN_NGROUPS, ngroups, CTLFLAG_RW, + 0, _NGROUPS_COMPAT, "Maximum number of groups allocated to a user"); SYSCTL_INT(_kern, KERN_JOB_CONTROL, job_control, CTLFLAG_RD, 0, 1, "Whether job control is available"); Index: sys/sys/param.h =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/sys/sys/param.h,v retrieving revision 1.382 diff -b -u -r1.382 param.h --- sys/sys/param.h 28 Jan 2009 17:57:16 -0000 1.382 +++ sys/sys/param.h 4 Feb 2009 14:11:55 -0000 @@ -57,7 +57,7 @@ * is created, otherwise 1. */ #undef __FreeBSD_version -#define __FreeBSD_version 800062 /* Master, propagated to newvers */ +#define __FreeBSD_version 800060 /* Master, propagated to newvers */ #ifndef LOCORE #include @@ -77,7 +77,8 @@ #define MAXLOGNAME 17 /* max login name length (incl. NUL) */ #define MAXUPRC CHILD_MAX /* max simultaneous processes */ #define NCARGS ARG_MAX /* max bytes for an exec function */ -#define NGROUPS NGROUPS_MAX /* max number groups */ +#define NGROUPS _NGROUPS_COMPAT + /* depreciated check sysctl/sysconf for NGROUPS_MAX value instead */ #define NOFILE OPEN_MAX /* max open files per process */ #define NOGROUP 65535 /* marker for empty group set member */ #define MAXHOSTNAMELEN 256 /* max hostname size */ Index: sys/sys/syslimits.h =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/sys/sys/syslimits.h,v retrieving revision 1.23 diff -b -u -r1.23 syslimits.h --- sys/sys/syslimits.h 29 May 2007 15:14:46 -0000 1.23 +++ sys/sys/syslimits.h 3 Feb 2009 18:02:22 -0000 @@ -54,7 +54,6 @@ #define MAX_CANON 255 /* max bytes in term canon input line */ #define MAX_INPUT 255 /* max bytes in terminal input */ #define NAME_MAX 255 /* max bytes in a file name */ -#define NGROUPS_MAX 16 /* max supplemental group id's */ #ifndef OPEN_MAX #define OPEN_MAX 64 /* max open files per process */ #endif @@ -66,9 +65,35 @@ * We leave the following values undefined to force applications to either * assume conservative values or call sysconf() to get the current value. * - * HOST_NAME_MAX + * HOST_NAME_MAX NGROUPS_MAX * * (We should do this for most of the values currently defined here, * but many programs are not prepared to deal with this yet.) */ +/* + * here are some reference values in respect of the obsoleted + * NGROUPS_MAX value. + * nb: some apps appear to check NGROUPS_MAX as meaning that + * ... system has user groups (i.e. to #ifdef chunks of code). + * ... this is easy to change but maybe historically defined? + */ +#define _NGROUPS_RPC_MAX 16 /* reference only */ + /* nb: this is the old system max, so named + * ... because it's limit appears to + * ... have been derived from a limitation + * ... in RPC (and thereby NFS), where it's + * ... the max number of groups we can exchange */ +#define _NGROUPS_COMPAT _NGROUPS_RPC_MAX /* reference only */ + /* nb: although this is defined as equal to the rpc + * ... limit, i have defined it distintly so that + * ... we may distinguish (whilst updating) usage + * ... that is correctly explicit (i.e. should be 16) + * ... and usage that is only 16 because of an expected + * ... convention. hopefully we may remove these and + * ... define additional _NGROUPS_*_MAX for those defined + * ... uses. */ +#define _NGROUPS_SYS_MAX 65536 /* reference only */ + /* nb: the idea's to have this extensible + * ... indefinately, this is what linux have and + * ... should more than cover immediate needs */ #endif Index: usr.bin/catman/catman.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/usr.bin/catman/catman.c,v retrieving revision 1.14 diff -b -u -r1.14 catman.c --- usr.bin/catman/catman.c 5 Dec 2005 14:22:12 -0000 1.14 +++ usr.bin/catman/catman.c 8 Feb 2009 22:51:44 -0000 @@ -93,8 +93,9 @@ enum Ziptype {NONE, BZIP, GZIP}; static uid_t uid; -static gid_t gids[NGROUPS_MAX]; +static gid_t *gids; static int ngids; +static int max_ngroups ; static int starting_dir; static char tmp_file[MAXPATHLEN]; struct stat test_st; @@ -789,7 +790,15 @@ /* NOTREACHED */ } } - ngids = getgroups(NGROUPS_MAX, gids); +/* allocate memory for group ids */ +#if _POSIX_VERSION > 199212 + max_ngroups = sysconf( _SC_NGROUPS_MAX ) ; +#elif defined(NGROUPS_MAX) + max_ngroups = NGROUPS_MAX ; +#else + max_ngroups = _NGROUPS_COMPAT ; +#endif + ngids = getgroups( max_ngroups, gids ) ; if ((starting_dir = open(".", 0)) < 0) { err(1, "."); } Index: usr.bin/newgrp/newgrp.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/usr.bin/newgrp/newgrp.c,v retrieving revision 1.2 diff -b -u -r1.2 newgrp.c --- usr.bin/newgrp/newgrp.c 30 Oct 2003 15:14:34 -0000 1.2 +++ usr.bin/newgrp/newgrp.c 9 Feb 2009 22:05:53 -0000 @@ -146,9 +146,10 @@ static void addgroup(const char *grpname) { - gid_t grps[NGROUPS_MAX]; + gid_t *grps; long lgid; - int dbmember, i, ngrps; + int dbmember, i, ngrps, max_ngroups ; + /* XXX: should 'max_ngroups' be a static const variable? */ gid_t egid; struct group *grp; char *ep, *pass; @@ -185,9 +186,21 @@ } } - if ((ngrps = getgroups(NGROUPS_MAX, (gid_t *)grps)) < 0) { +#if _POSIX_VERSION >= 199212 + max_ngroups = sysconf( _SC_NGROUPS_MAX ) ; +#elif defined(NGROUPS_MAX) + max_ngroups = NGROUPS_MAX ; +#else + max_ngroups = _NGROUPS_COMPAT ; +#endif + grps = (gid_t*)calloc( max_ngroups, sizeof(gid_t) ) ; + if( grps == NULL ) { + warn( "group set memory allocation" ) ; + return ; + } + if( (ngrps=getgroups(max_ngroups,(gid_t*)grps)) < 0 ) { warn("getgroups"); - return; + goto error_free ; } /* Remove requested gid from supp. list if it exists. */ @@ -201,7 +214,7 @@ if (setgroups(ngrps, (const gid_t *)grps) < 0) { PRIV_END; warn("setgroups"); - return; + goto error_free ; } PRIV_END; } @@ -210,14 +223,14 @@ if (setgid(grp->gr_gid)) { PRIV_END; warn("setgid"); - return; + goto error_free ; } PRIV_END; grps[0] = grp->gr_gid; /* Add old effective gid to supp. list if it does not exist. */ if (egid != grp->gr_gid && !inarray(egid, grps, ngrps)) { - if (ngrps == NGROUPS_MAX) + if( ngrps == max_ngroups ) warnx("too many groups"); else { grps[ngrps++] = egid; @@ -225,12 +238,15 @@ if (setgroups(ngrps, (const gid_t *)grps)) { PRIV_END; warn("setgroups"); - return; + goto error_free ; } PRIV_END; } } +error_free: + free( grps ) ; + return ; } static int Index: usr.sbin/chown/chown.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/usr.sbin/chown/chown.c,v retrieving revision 1.29 diff -b -u -r1.29 chown.c --- usr.sbin/chown/chown.c 7 Aug 2004 04:19:37 -0000 1.29 +++ usr.sbin/chown/chown.c 8 Feb 2009 16:22:31 -0000 @@ -269,7 +269,8 @@ { static uid_t euid = -1; static int ngroups = -1; - gid_t groups[NGROUPS_MAX]; + static int max_groups ; + gid_t *groups; /* Check for chown without being root. */ if (errno != EPERM || (uid != (uid_t)-1 && @@ -279,16 +280,31 @@ } /* Check group membership; kernel just returns EPERM. */ +#if _POSIX_VERSION >= 199212 + max_groups = sysconf( _SC_NGROUPS_MAX ) ; +#elif defined(NGROUPS_MAX) + max_groups = NGROUPS_MAX ; +#else + max_groups = _NGROUPS_COMPAT ; +#endif + groups = (gid_t*)calloc( max_groups, sizeof(gid_t) ) ; + if( groups == NULL ) { + warnx( "failed to allocate memory for group set" ) ; + goto exit_cleanup ; + } if (gid != (gid_t)-1 && ngroups == -1 && euid == (uid_t)-1 && (euid = geteuid()) != 0) { - ngroups = getgroups(NGROUPS_MAX, groups); + ngroups = getgroups( max_groups, groups ) ; while (--ngroups >= 0 && gid != groups[ngroups]); if (ngroups < 0) { warnx("you are not a member of group %s", gname); - return; + goto exit_cleanup ; } } warn("%s", file); +exit_cleanup: + free( groups ) ; + return ; } void Index: usr.sbin/chroot/chroot.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/usr.sbin/chroot/chroot.c,v retrieving revision 1.11 diff -b -u -r1.11 chroot.c --- usr.sbin/chroot/chroot.c 7 Aug 2004 04:19:37 -0000 1.11 +++ usr.sbin/chroot/chroot.c 5 Feb 2009 23:29:48 -0000 @@ -59,6 +59,7 @@ char *user; /* user to switch to before running program */ char *group; /* group to switch to ... */ char *grouplist; /* group list to switch to ... */ +int max_ngroups; /* max number of groups allowable */ int main(argc, argv) @@ -69,12 +70,25 @@ struct passwd *pw; char *endp, *p; const char *shell; - gid_t gid, gidlist[NGROUPS_MAX]; + gid_t gid, *gidlist ; uid_t uid; - int ch, gids; + int ch, gids ; +/* set some defaults */ gid = 0; uid = 0; + user = NULL ; + group = NULL ; + grouplist = NULL ; +#if _POSIX_VERSION >= 199212 + max_ngroups = sysconf( _SC_NGROUPS_MAX ) ; +#elif defined(NGROUPS_MAX) + max_ngroups = NGROUPS_MAX ; +#else + max_ngroups = _NGROUPS_COMPAT ; +#endif + +/* process command line options */ while ((ch = getopt(argc, argv, "G:g:u:")) != -1) { switch(ch) { case 'u': @@ -103,9 +117,12 @@ if (argc < 1) usage(); +/* if a group argument was passed then process it */ if (group != NULL) { + /* if the first char's a digit then assume it's a gid ... */ if (isdigit((unsigned char)*group)) { gid = (gid_t)strtoul(group, &endp, 0); + /* ... and back out that assumption if it proves wrong */ if (*endp != '\0') goto getgroup; } else { @@ -117,8 +134,15 @@ } } - for (gids = 0; - (p = strsep(&grouplist, ",")) != NULL && gids < NGROUPS_MAX; ) { +/* process command line group list */ + if( grouplist != NULL ) { + gidlist = (gid_t*)calloc( max_ngroups, sizeof(gid_t) ) ; + if( gidlist == NULL ) + errx( 1, "inadquate memory for group list" ) ; + for( gids = 0 ; + gids < max_ngroups && + (p=strsep(&grouplist,",")) != NULL ; ) + { if (*p == '\0') continue; @@ -135,9 +159,11 @@ } gids++; } - if (p != NULL && gids == NGROUPS_MAX) + if( p != NULL && gids == max_ngroups ) errx(1, "too many supplementary groups provided"); + } +/* set user from command line option, if supplied */ if (user != NULL) { if (isdigit((unsigned char)*user)) { uid = (uid_t)strtoul(user, &endp, 0); @@ -152,9 +178,11 @@ } } +/* change root */ if (chdir(argv[0]) == -1 || chroot(".") == -1) err(1, "%s", argv[0]); +/* set credentials */ if (gids && setgroups(gids, gidlist) == -1) err(1, "setgroups"); if (group && setgid(gid) == -1) @@ -162,11 +190,14 @@ if (user && setuid(uid) == -1) err(1, "setuid"); +/* exec the remaining arguments as the chroot'd command ... */ if (argv[1]) { execvp(argv[1], &argv[1]); err(1, "%s", argv[1]); + /* NOTREACHED */ } +/* ... or execute the default system shell */ if (!(shell = getenv("SHELL"))) shell = _PATH_BSHELL; execlp(shell, shell, "-i", (char *)NULL); Index: usr.sbin/gssd/gssd.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/usr.sbin/gssd/gssd.c,v retrieving revision 1.1 diff -b -u -r1.1 gssd.c --- usr.sbin/gssd/gssd.c 3 Nov 2008 10:38:00 -0000 1.1 +++ usr.sbin/gssd/gssd.c 5 Feb 2009 16:16:37 -0000 @@ -464,8 +464,8 @@ result->uid = uid; getpwuid_r(uid, &pwd, buf, sizeof(buf), &pw); if (pw) { - int len = NGRPS; - int groups[NGRPS]; + int len = AUTH_UNIX_NGROUPS ; + int groups[AUTH_UNIX_NGROUPS] ; result->gid = pw->pw_gid; getgrouplist(pw->pw_name, pw->pw_gid, groups, &len); Index: usr.sbin/mount_portalfs/cred.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/usr.sbin/mount_portalfs/cred.c,v retrieving revision 1.1 diff -b -u -r1.1 cred.c --- usr.sbin/mount_portalfs/cred.c 11 Mar 2005 08:39:58 -0000 1.1 +++ usr.sbin/mount_portalfs/cred.c 16 Jan 2009 23:49:36 -0000 @@ -46,7 +46,7 @@ set_user_credentials(struct portal_cred *user, struct portal_cred *save) { save->pcr_uid = geteuid(); - if ((save->pcr_ngroups = getgroups(NGROUPS_MAX, save->pcr_groups)) < 0) + if( (save->pcr_ngroups=getgroups(_NGROUPS_COMPAT,save->pcr_groups)) < 0 ) return (-1); if (setgroups(user->pcr_ngroups, user->pcr_groups) < 0) return (-1); Index: usr.sbin/pppd/options.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/usr.sbin/pppd/options.c,v retrieving revision 1.26 diff -b -u -r1.26 options.c --- usr.sbin/pppd/options.c 7 Nov 2007 10:53:38 -0000 1.26 +++ usr.sbin/pppd/options.c 10 Feb 2009 09:11:47 -0000 @@ -72,10 +72,6 @@ char *strdup(char *); #endif -#ifndef GIDSET_TYPE -#define GIDSET_TYPE gid_t -#endif - /* * Option variables and default values. */ @@ -779,23 +775,64 @@ int fd; { uid_t uid; - int ngroups, i; + int ngroups, max_ngroups, i; struct stat sbuf; - GIDSET_TYPE groups[NGROUPS_MAX]; + gid_t *groups; +/* get the uid */ uid = getuid(); +/* ... and return true if root */ +/* XXX: needs credential check */ if (uid == 0) return 1; + +/* if we're not root, get some info about the file */ if (fstat(fd, &sbuf) != 0) return 0; + +/* test for owner match with current process */ if (sbuf.st_uid == uid) return sbuf.st_mode & S_IRUSR; +/* ... and a group match */ if (sbuf.st_gid == getgid()) return sbuf.st_mode & S_IRGRP; - ngroups = getgroups(NGROUPS_MAX, groups); - for (i = 0; i < ngroups; ++i) - if (sbuf.st_gid == groups[i]) - return sbuf.st_mode & S_IRGRP; + +/* if we've still no luck then check the group list for permission match */ +#if _POSIX_VERSION >= 199212 + max_ngroups = sysconf( _SC_NGROUPS_MAX ) ; +#elif defined(NGROUPS_MAX) + max_ngroups = NGROUPS_MAX ; +#else + max_ngroups = _NGROUPS_COMPAT ; +#endif + groups = (gid_t*) calloc( max_ngroups, sizeof(gid_t) ) ; + if( groups == NULL ) { + /* if we cannot check groups correctly then assume 'fd' is unreadable + * XXX: this may be false as the converse is more likely. + * i.e. it would be failed readable on available groups + * and granted on full list, however, we just can't be + * psychic and i'm not about to code some idiotic loop that tries + * to get 'some' memory for partial testing. probably a better + * recourse would be to simply die here but that seems severe + * for a 'readable' test. + * NB: we don't need a 'full' allocation of memory to test the + * group list, only to store it. one idea would be to do this in + * 'blocks' + */ + option_error( 1, "unable to allocate memory for group list" ) ; + return( 0 ) ; + } +/* get groups */ + ngroups = getgroups( max_ngroups, groups ) ; +/* ... and test the group permission if matching */ + for( i = 0 ; i < ngroups ; ++i ) { + if (sbuf.st_gid == groups[i]) { + free( (void*)groups) ; + return( sbuf.st_mode & S_IRGRP ) ; + } + } +/* otherwise return other permissions match */ + free( (void*)groups ) ; return sbuf.st_mode & S_IROTH; } Index: usr.sbin/rpc.lockd/kern.c =================================================================== RCS file: /home/__orole/dev/cabinet/zeeNi/ai/freebsd/src/usr.sbin/rpc.lockd/kern.c,v retrieving revision 1.21 diff -b -u -r1.21 kern.c --- usr.sbin/rpc.lockd/kern.c 17 Aug 2006 05:55:20 -0000 1.21 +++ usr.sbin/rpc.lockd/kern.c 5 Feb 2009 16:22:17 -0000 @@ -239,15 +239,15 @@ int ngroups; ngroups = xucred->cr_ngroups - 1; - if (ngroups > NGRPS) - ngroups = NGRPS; - if (cl->cl_auth != NULL) - cl->cl_auth->ah_ops->ah_destroy(cl->cl_auth); - cl->cl_auth = authunix_create(hostname, + if( ngroups > AUTH_UNIX_NGROUPS ) + ngroups = AUTH_UNIX_NGROUPS ; + if( cl->cl_auth != NULL ) + cl->cl_auth->ah_ops->ah_destroy( cl->cl_auth ) ; + cl->cl_auth = authunix_create( hostname, xucred->cr_uid, xucred->cr_groups[0], ngroups, - &xucred->cr_groups[1]); + &xucred->cr_groups[1] ) ; } --jRHKVT23PllUwdXP-- From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 21 18:50:37 2009 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 452A01065690 for ; Sat, 21 Feb 2009 18:50:37 +0000 (UTC) (envelope-from barkinkilic@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.189]) by mx1.freebsd.org (Postfix) with ESMTP id CDE4E8FC24 for ; Sat, 21 Feb 2009 18:50:36 +0000 (UTC) (envelope-from barkinkilic@gmail.com) Received: by fk-out-0910.google.com with SMTP id f40so2014623fka.11 for ; Sat, 21 Feb 2009 10:50:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=l0HFoCyXbqrSSxRyU8W0b8KfPmYw2CTmhK/2tOmxWn0=; b=mXIIq8xJZx/z9oJ+IRfcE1y1Z3FZdYBPxR3vYBdWOg/xgSBX5wIo/JOgki9XgzvEgS V4qnKgBWcLwSrleycDg/lYWeb/8Vt/wSNHR6MTYB7Bz5rI9ZEFSk4j1sbTpbKXqSw4v7 BZnmFsIII8N2hy23GjyfrH2MmNMxSp5aMj5/4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=WfOBYtQGe9EGSSPvOoy7DlMPHzHV+QmOD5oJHYX/WVHTxVSm5koEt9Hj2Y5m17gROk jfFInJt7cbhUY/RfGcH6EoQZEqkp+j0kPQqki57oAfdrUnuqvpI+LOB+17S5n4wuJXhj /zyqgfslGM8Rz645Xu2/nZTuTl4k9G9zWTrY8= MIME-Version: 1.0 Received: by 10.223.122.70 with SMTP id k6mr2801888far.26.1235240496378; Sat, 21 Feb 2009 10:21:36 -0800 (PST) Date: Sat, 21 Feb 2009 19:21:36 +0100 Message-ID: <9f8b20dc0902211021i687eefc9iff1e05b763712c03@mail.gmail.com> From: =?ISO-8859-9?B?QmFya/1uIEtJTEnH?= To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: ethernet card error 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, 21 Feb 2009 18:50:37 -0000 Hi all After a normal reboot i sometimes get errors at my log file about my ethernet card like: Feb 19 03:51:32 ortam kernel: dc0: dc_setcfg: failed to force tx to idle state Feb 19 03:52:11 ortam kernel: dc0: watchdog timeout and i loose my network connection, and it get fixed after a reboot. What is this error and how could i fix this without rebooting everytime it occurs.. uname -a : FreeBSD ortam.barkin.info 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 thanks -- barkink