From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 10 16:27:38 2007 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 0767416A417 for ; Mon, 10 Sep 2007 16:27:38 +0000 (UTC) (envelope-from mwm@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.freebsd.org (Postfix) with SMTP id 7890613C46B for ; Mon, 10 Sep 2007 16:27:37 +0000 (UTC) (envelope-from mwm@mired.org) Received: (qmail 76385 invoked from network); 10 Sep 2007 15:59:58 -0000 Received: from unknown (HELO mbook.mired.org) (192.168.195.2) by 0 with SMTP; 10 Sep 2007 15:59:58 -0000 Date: Mon, 10 Sep 2007 12:00:39 -0400 From: Mike Meyer To: Markus Hitter Message-ID: <20070910120039.3fc3917e@mbook.mired.org> In-Reply-To: <74423CD8-F9C1-454D-83BB-0114402C2CCC@jump-ing.de> References: <20070904233246.GA2409@epia-2.farid-hajji.net> <043a01c7f202$a7ad0920$f7071b60$@co.uk> <046801c7f229$a4534510$ecf9cf30$@co.uk> <74423CD8-F9C1-454D-83BB-0114402C2CCC@jump-ing.de> Organization: Meyer Consulting X-Mailer: Claws Mail 2.10.0 (GTK+ 2.6.10; i386-apple-darwin8.10.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 17 Sep 2007 13:16:09 +0000 Cc: hackers@FreeBSD.org, 'cpghost' , 'Gavin, freebsd-current@FreeBSD.org, Lawrence Farr , Atkinson' Subject: Re: dump problems 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, 10 Sep 2007 16:27:38 -0000 On Mon, 10 Sep 2007 14:14:00 +0200 Markus Hitter wrote: > Am 10.09.2007 um 10:14 schrieb Danny Braniss: > > so here are some questions: > > - is the readers/writer split realy needed now? my guess it was > > put in in the old days to get tapes streaming - which is > > btw, > > what's not working. > Before you put a lot of efforts into this: Why don't you just let > dump/restore die and put functionality, which is needed and unique to > dump, into tar? Because doing that would require rewriting tar pretty much from the ground up? > Tar is far more popular, today's world is multiplatform, today's > world is multi-filesystem and if you rewrite dump, you force admins > to rewrite their scripts anyways. Tar is an excellent tool for moving data between platforms and file systems. It's not a good tool for backing up a file system. Fixing dump won't necessarily require admins to fix their scripts - it's been done more than once in the past. > I've always considered it as sub-optimal to have several tools for > one task. Just because multiple tools can perform task doesn't mean you have multiple tools for that task. I.e. - you can convince cat, cp, tar, sed, awk, rsync, and a host of others can copy a file. Which one you use depends on what you're trying to do. There's only one tool that can be used to reliably back up and restore a file system - and that's dump. Tar, cpio, GNU cp, etc. can be used to do the job, but they don't always get it right. In particular, none of them will correctly reproduce holes in files. dump will. Symlinks, special files, and similar things all cause some of the others to do odd things - exactly which ones and exactly what odd things varying depending on what you're looking at and the version of the other thing. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 18 12:25:10 2007 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 462C016A41A for ; Tue, 18 Sep 2007 12:25:10 +0000 (UTC) (envelope-from lukin@stu.cn.ua) Received: from mail.soft-industry.com (mail.soft.cn.ua [195.189.200.4]) by mx1.freebsd.org (Postfix) with ESMTP id E138713C474 for ; Tue, 18 Sep 2007 12:25:09 +0000 (UTC) (envelope-from lukin@stu.cn.ua) Received: from lukin.stu.cn.ua (lukin.stu.cn.ua [195.69.76.145]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.soft-industry.com (Postfix) with ESMTP id 4152987847 for ; Tue, 18 Sep 2007 14:33:40 +0300 (EEST) From: Alex Lukin Organization: ChSTU To: freebsd-hackers@freebsd.org Date: Tue, 18 Sep 2007 14:32:41 +0300 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200709181432.41962.lukin@stu.cn.ua> X-Mailman-Approved-At: Tue, 18 Sep 2007 12:32:52 +0000 Subject: Attansic L1 Gigabit LAN Controller 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, 18 Sep 2007 12:25:10 -0000 Hi, FreeBSD gurus! Is anybody working on driver for ${subj} ? Linux 2.6.22 has driver for this card ( Attansic L1) under GNU license, so we can port it to FreeBSD. Some smart guy bought ASUS MB with this addapter on board for my university and I need to run FreeBSD so... I badly need the driver. This driver is Intel's e1000 so it won't be much difficult to port. I do not have any expirience to write BSD network drivers so please guys take this task for 7.0 If no one interested so let it be, it will my first net driver for FreeBSD :) -- SY, Alex Lukin RIPE NIC HDL: LEXA1-RIPE From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 18 16:44:19 2007 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 43E7C16A420 for ; Tue, 18 Sep 2007 16:44:19 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id C35AD13C4F3 for ; Tue, 18 Sep 2007 16:44:12 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id l8IGDZqL018253 for ; Tue, 18 Sep 2007 09:13:35 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.1/8.14.1/Submit) id l8IGDZEp018252 for freebsd-hackers@freebsd.org; Tue, 18 Sep 2007 09:13:35 -0700 (PDT) (envelope-from obrien) Date: Tue, 18 Sep 2007 09:13:35 -0700 From: "David O'Brien" To: freebsd-hackers@freebsd.org Message-ID: <20070918161335.GA17348@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 7.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 User-Agent: Mutt/1.5.11 Subject: Anything weird about size or layout of 'struct thread'? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2007 16:44:19 -0000 For a reason I haven't tracked down, this patch results in a panic on 6-STABLE when taking the GENERIC kernel and adding WITNESS, INVARIANTS, INVARIANT_SUPPORT, MUTEX_DEBUG, KDB, KDB_TRACE, DDB. Index: sys/proc.h =================================================================== RCS file: /home/ncvs/src/sys/sys/proc.h,v retrieving revision 1.432.2.11 diff -u -p -u -1 -r1.432.2.11 proc.h --- sys/proc.h 4 Sep 2007 22:40:40 -0000 1.432.2.11 +++ sys/proc.h 18 Sep 2007 15:28:11 -0000 @@ -292,2 +292,3 @@ struct thread { u_int64_t td_sticks; /* (k) Statclock hits in system mode. */ + u_int xx_one; u_int td_uuticks; /* (k) Statclock hits (usr), for UTS. */ The Panic(tm) [both on i386 and amd64]: Timecounter "TSC" frequency 2192270208 Hz quality 800 Timecounters tick every 1.000 msec panic: mutex sched lock not owned at ../../../kern/kern_fork.c:807 KDB: stack backtrace: kdb_backtrace(c0a3d9d6,c0cd2f40,c0a3c5fc,e6fd2cd0,100,...) at 0xc07641de = kdb_backtrace+0x2e panic(c0a3c5fc,c0a3c715,c0a39de4,327,c83be4b3,...) at 0xc0744667 = panic+0xb7 _mtx_assert(c0cd2c40,9,c0a39de4,327,ffffffff,...) at 0xc0738ec7 = _mtx_assert+0x87 fork_exit(c07297f0,c84b5c30,e6fd2d38) at 0xc072804a = fork_exit+0x5a fork_trampoline() at 0xc099373c = fork_trampoline+0x8 --- trap 0x1, eip = 0, esp = 0xe6fd2d6c, ebp = 0 --- It should not be a dependancies or stale issue - as I rm the kernel compile directory before config'ing the kernel and I still get the panic. Ideas? -- -- David (obrien@FreeBSD.org) From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 18 20:00:04 2007 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 F169D16A418 for ; Tue, 18 Sep 2007 20:00:04 +0000 (UTC) (envelope-from remko@elvandar.org) Received: from galain.elvandar.org (redqueen.elvandar.org [217.148.169.55]) by mx1.freebsd.org (Postfix) with ESMTP id B334F13C45D for ; Tue, 18 Sep 2007 20:00:04 +0000 (UTC) (envelope-from remko@elvandar.org) Received: from localhost.we-dare.net ([127.0.0.1] helo=galain.elvandar.org) by galain.elvandar.org with esmtp (Exim 4.67) (envelope-from ) id 1IXiOd-000N15-Ko; Tue, 18 Sep 2007 21:06:07 +0200 Received: from 195.64.94.120 (SquirrelMail authenticated user remko) by galain.elvandar.org with HTTP; Tue, 18 Sep 2007 21:06:07 +0200 (CEST) Message-ID: <62448.195.64.94.120.1190142367.squirrel@galain.elvandar.org> In-Reply-To: <200709181432.41962.lukin@stu.cn.ua> References: <200709181432.41962.lukin@stu.cn.ua> Date: Tue, 18 Sep 2007 21:06:07 +0200 (CEST) From: "Remko Lodder" To: "Alex Lukin" User-Agent: SquirrelMail/1.4.10a 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: Attansic L1 Gigabit LAN Controller X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: remko@elvandar.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2007 20:00:05 -0000 Hello Alex, PErhaps you can start by submitting a boot -v and pciconf -vl from the machine to identify the card? if it's a common thing we use at the moment already; the addition -could- be trivial... but without any information this is difficult. Remember that something which is important for you might not be important for others; demanding work from others is interesting every now and then; so if you -urgently- and -really- need it, you could consider funding this part :-) Cheers remko On Tue, September 18, 2007 1:32 pm, Alex Lukin wrote: > Hi, FreeBSD gurus! > > Is anybody working on driver for ${subj} ? > > Linux 2.6.22 has driver for this card ( Attansic L1) under GNU license, > so we > can port it to FreeBSD. Some smart guy bought ASUS MB with this addapter > on > board for my university and I need to run FreeBSD so... I badly need the > driver. > > This driver is Intel's e1000 so it won't be much difficult to port. > I do not have any expirience to write BSD network drivers so please guys > take > this task for 7.0 > > If no one interested so let it be, it will my first net driver for FreeBSD > :) > -- > SY, Alex Lukin > RIPE NIC HDL: LEXA1-RIPE > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- Kind regards, Remko Lodder ** remko@elvandar.org FreeBSD ** remko@FreeBSD.org /* Quis custodiet ipsos custodes */ From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 18 21:27:16 2007 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 BFC5E16A417; Tue, 18 Sep 2007 21:27:16 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from gritton.org (gritton.org [161.58.222.4]) by mx1.freebsd.org (Postfix) with ESMTP id 6707713C461; Tue, 18 Sep 2007 21:27:16 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from [10.20.12.66] (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by gritton.org (8.13.6.20060614/8.13.6) with ESMTP id l8IL3Hhu008692; Tue, 18 Sep 2007 15:03:17 -0600 (MDT) Message-ID: <46F03D10.2070607@gritton.org> Date: Tue, 18 Sep 2007 15:03:12 -0600 From: James Gritton User-Agent: Thunderbird 1.5.0.2 (X11/20060512) MIME-Version: 1.0 To: freebsd-jail@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Hierarchical jails - any current work? 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, 18 Sep 2007 21:27:16 -0000 I've been doing some work on a hierarchical jail setup, but I've got this nagging feeling it's been done before. Does anyone know of such an existing project? If not, I'll put forward my own code. - James Gritton jamie@gritton.org From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 06:00:43 2007 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 ADB5C16A41A for ; Wed, 19 Sep 2007 06:00:43 +0000 (UTC) (envelope-from kevlo@kevlo.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id BC4BE13C45A for ; Wed, 19 Sep 2007 06:00:42 +0000 (UTC) (envelope-from kevlo@kevlo.org) Received: from [127.0.0.1] (kevlo.org [220.128.136.52]) (authenticated bits=0) by ns.kevlo.org (8.14.1/8.14.1) with ESMTP id l4J5eLrk002023; Sat, 19 May 2007 13:40:26 +0800 (CST) (envelope-from kevlo@kevlo.org) From: Kevin Lo To: Alex Lukin In-Reply-To: <200709181432.41962.lukin@stu.cn.ua> References: <200709181432.41962.lukin@stu.cn.ua> Content-Type: text/plain Date: Wed, 19 Sep 2007 13:38:36 +0800 Message-Id: <1190180316.5984.19.camel@monet> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Attansic L1 Gigabit LAN Controller 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, 19 Sep 2007 06:00:43 -0000 Alex Lukin wrote: > Hi, FreeBSD gurus! Hi Alex, > Is anybody working on driver for ${subj} ? I'm working on this driver. The porting progress is slow since I have some other things to do. Currently, the driver called age can detect MAC address: age0: flags=8802 metric 0 mtu 1500 options=9b ether 00:1b:fc:64:d1:8e > Linux 2.6.22 has driver for this card ( Attansic L1) under GNU license, so we > can port it to FreeBSD. Some smart guy bought ASUS MB with this addapter on > board for my university and I need to run FreeBSD so... I badly need the > driver. > > This driver is Intel's e1000 so it won't be much difficult to port. Not exactly. > I do not have any expirience to write BSD network drivers so please guys take > this task for 7.0 > > If no one interested so let it be, it will my first net driver for FreeBSD :) If you're interested, I can send you my patch(against -HEAD). Kevin From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 18 15:45:25 2007 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 1025B16A417 for ; Tue, 18 Sep 2007 15:45:25 +0000 (UTC) (envelope-from cerny@icomvision.com) Received: from mohinder.icomvision.com (icom.casablanca.cz [81.0.254.115]) by mx1.freebsd.org (Postfix) with ESMTP id D180313C4A3 for ; Tue, 18 Sep 2007 15:45:24 +0000 (UTC) (envelope-from cerny@icomvision.com) Received: by mohinder.icomvision.com (Postfix, from userid 503) id 575F3F1969; Tue, 18 Sep 2007 17:45:14 +0200 (CEST) Date: Tue, 18 Sep 2007 17:45:14 +0200 From: Marian Cerny To: freebsd-hackers@freebsd.org Message-ID: <20070918154514.GA71760@icomvision.com> References: <20070816225344.GA67058@icomvision.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070816225344.GA67058@icomvision.com> User-Agent: Mutt/1.4.2.3i X-Mailman-Approved-At: Wed, 19 Sep 2007 07:50:46 +0000 Subject: Re: pccard0: Card has no functions! (solved) 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, 18 Sep 2007 15:45:25 -0000 On 2007-08-17 00:53 +0200, Marian Cerny wrote: > I have Nokia Card Phone 2.0 (on a supported HW list) in a PCMCIA to PCI > adapter. I have used this combination some time ago (2-3 years) and it worked > without any problems. I don't remember what FreeBSD version I used that time. > > I tried to get it working under FreeBSD 6.2R today but was not > successful. I can see those messages after boot: > > Status is 0x30000410 > cbb0: card inserted: event=0x00000000, state=30000410 > pccard0: chip_socket_enable > cbb_pcic_socket_enable: > cbb0: cbb_power: 5V > pccard0: read_cis > cis mem map 0xe7286000 (resource: 0xfe310000) > pccard0: CIS tuple chain: > CISTPL_END > ff > cis mem map e7286000 > CISTPL_LINKTARGET expected, code ff observed > pccard0: check_cis_quirks > pccard0: Card has no functions! > cbb0: PC Card card activation failed The problem was in the PCI to PCMCIA adapter. It was not able to read "CIS tuple chain" of any PCMCIA card. I have bought a new adapter, with a Ricoh R5C485 chip (the old one had R5C475II) and it works without any problems. The real problem with the old adapter was not fixed - however I consider the problem to be solved. > pciconf -lv: > cbb0@pci5:2:0: class=0x060700 card=0x010114ef chip=0x04751180 rev=0x80 hdr=0x02 > vendor = 'Ricoh Co Ltd' > device = 'RL5c475 CardBus Controller' > class = bridge > subclass = PCI-CardBus The new adapter is similar to the old one according to pciconf: cbb0@pci1:0:0: class=0x060700 card=0x00000000 chip=0x04751180 rev=0x81 hdr=0x02 vendor = 'Ricoh Co Ltd' device = 'RL5c475 CardBus Controller' class = bridge subclass = PCI-CardBus Marian Cerny From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 07:42:18 2007 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 F141416A420 for ; Wed, 19 Sep 2007 07:42:17 +0000 (UTC) (envelope-from lukin@stu.cn.ua) Received: from mail.soft-industry.com (mail.soft.cn.ua [195.189.200.4]) by mx1.freebsd.org (Postfix) with ESMTP id 85E1113C4DE for ; Wed, 19 Sep 2007 07:42:17 +0000 (UTC) (envelope-from lukin@stu.cn.ua) Received: from lukin.stu.cn.ua (lukin.stu.cn.ua [195.69.76.145]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.soft-industry.com (Postfix) with ESMTP id 9A82387320; Wed, 19 Sep 2007 10:42:18 +0300 (EEST) From: Alex Lukin Organization: ChSTU To: remko@elvandar.org Date: Wed, 19 Sep 2007 10:41:22 +0300 User-Agent: KMail/1.9.7 References: <200709181432.41962.lukin@stu.cn.ua> <62448.195.64.94.120.1190142367.squirrel@galain.elvandar.org> In-Reply-To: <62448.195.64.94.120.1190142367.squirrel@galain.elvandar.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200709191041.22377.lukin@stu.cn.ua> X-Mailman-Approved-At: Wed, 19 Sep 2007 07:50:46 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Attansic L1 Gigabit LAN Controller 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, 19 Sep 2007 07:42:18 -0000 Hi, Remko! Hi, hackers! > Hello Alex, > > PErhaps you can start by submitting a boot -v and pciconf -vl from the > machine to identify the card? if it's a common thing we use at the moment > already; the addition -could- be trivial... but without any information > this is difficult. boot does not say much, pciconf too: none2@pci2:0:0: class=0x020000 card=0x82261043 chip=0x10481969 rev=0xb0 hdr=0x00 class = network subclass = ethernet > Remember that something which is important for you might not be important > for others; demanding work from others is interesting every now and then; > so if you -urgently- and -really- need it, you could consider funding this > part :-) > Thank you for lesson, dear teacher :) -- SY, Alex Lukin RIPE NIC HDL: LEXA1-RIPE From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 07:46:31 2007 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 55CF116A417 for ; Wed, 19 Sep 2007 07:46:31 +0000 (UTC) (envelope-from lukin@stu.cn.ua) Received: from mail.soft-industry.com (mail.soft.cn.ua [195.189.200.4]) by mx1.freebsd.org (Postfix) with ESMTP id E04D513C45D for ; Wed, 19 Sep 2007 07:46:30 +0000 (UTC) (envelope-from lukin@stu.cn.ua) Received: from lukin.stu.cn.ua (lukin.stu.cn.ua [195.69.76.145]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.soft-industry.com (Postfix) with ESMTP id 5B5D386465 for ; Wed, 19 Sep 2007 10:46:33 +0300 (EEST) From: Alex Lukin Organization: ChSTU To: freebsd-hackers@freebsd.org Date: Wed, 19 Sep 2007 10:45:35 +0300 User-Agent: KMail/1.9.7 References: <200709181432.41962.lukin@stu.cn.ua> <1190180316.5984.19.camel@monet> In-Reply-To: <1190180316.5984.19.camel@monet> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200709191045.36168.lukin@stu.cn.ua> X-Mailman-Approved-At: Wed, 19 Sep 2007 07:50:46 +0000 Subject: Re: Attansic L1 Gigabit LAN Controller 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, 19 Sep 2007 07:46:31 -0000 Hi, Kevin! Please send me your patch, I'll try to help you with development. I wold be nice if you can write short message which part of driver you work on and which part I'll be. Wednesday 19 September 2007 08:38:36 Kevin Lo =D0=BD=D0=B0=D0=BF=D0=B8=D1= =81=D0=B0=D0=B2: > Alex Lukin wrote: > > Hi, FreeBSD gurus! > > Hi Alex, > > > Is anybody working on driver for ${subj} ? > > I'm working on this driver. The porting progress is slow since I have > some other things to do. Currently, the driver called age can detect > MAC address: > > age0: flags=3D8802 metric 0 mtu 1500 > options=3D9b > ether 00:1b:fc:64:d1:8e > > > Linux 2.6.22 has driver for this card ( Attansic L1) under GNU license, > > so we can port it to FreeBSD. Some smart guy bought ASUS MB with this > > addapter on board for my university and I need to run FreeBSD so... I > > badly need the driver. > > > > This driver is Intel's e1000 so it won't be much difficult to port. > > Not exactly. > > > I do not have any expirience to write BSD network drivers so please guys > > take this task for 7.0 > > > > If no one interested so let it be, it will my first net driver for > > FreeBSD :) > > If you're interested, I can send you my patch(against -HEAD). > > Kevin > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" =2D-=20 SY, Alex Lukin RIPE NIC HDL: LEXA1-RIPE From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 08:38:52 2007 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 495F716A419 for ; Wed, 19 Sep 2007 08:38:52 +0000 (UTC) (envelope-from kevlo@kevlo.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id AB81613C46C for ; Wed, 19 Sep 2007 08:38:51 +0000 (UTC) (envelope-from kevlo@kevlo.org) Received: from [127.0.0.1] (kevlo.org [220.128.136.52]) (authenticated bits=0) by ns.kevlo.org (8.14.1/8.14.1) with ESMTP id l4J8eYu4002891 for ; Sat, 19 May 2007 16:40:35 +0800 (CST) (envelope-from kevlo@kevlo.org) From: Kevin Lo To: freebsd-hackers@freebsd.org In-Reply-To: <200709191045.36168.lukin@stu.cn.ua> References: <200709181432.41962.lukin@stu.cn.ua> <1190180316.5984.19.camel@monet> <200709191045.36168.lukin@stu.cn.ua> Content-Type: text/plain Date: Wed, 19 Sep 2007 16:38:52 +0800 Message-Id: <1190191132.5984.25.camel@monet> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Subject: Re: Attansic L1 Gigabit LAN Controller 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, 19 Sep 2007 08:38:52 -0000 Alex Lukin wrote: > Hi, Kevin! > > Please send me your patch, I'll try to help you with development. > I wold be nice if you can write short message which part of driver > you work on and which part I'll be. I just send you the patch, please check your inbox :-) Kevin From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 09:28:58 2007 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 66B0E16A419 for ; Wed, 19 Sep 2007 09:28:58 +0000 (UTC) (envelope-from ighighi@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.245]) by mx1.freebsd.org (Postfix) with ESMTP id E9ADC13C458 for ; Wed, 19 Sep 2007 09:28:57 +0000 (UTC) (envelope-from ighighi@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so22998anc for ; Wed, 19 Sep 2007 02:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:content-type; bh=zbLMNUN879pujO7F6gveGxmxrBnfjqmL9BoWDsSapDY=; b=Omwx9yvlb8LtwEAcIalT8sQN1iTlDPm4ryrUVU2xsjXb/GFdCfV97rLdXDWgIAZn4QqVHg9hlt1kuxSgEniSUXmlzCGwlDYipLClUdtLga6bWxGNvCNi++E1Hr/9m+xuBNveBETJ65QNhI+nkLullST8L2oDS0zp6b6uxbnTJWA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:content-type; b=AqSqIq7HPc9qV5kJ5eu+r7G6HT2XpWkWz8nrPvy1mTVlW12wBlkLb9q0wutNdDa1TK14+GZ9zohlUWD23BA982x7kxlQw7u/Yxpx59r1AG8fwcobE7KbDQs2h+Y1sXhHIv78AcZm3OWXolDZKSkv+jczrSPW+UmVPsfq6FllEn8= Received: by 10.100.107.2 with SMTP id f2mr953975anc.1190194137261; Wed, 19 Sep 2007 02:28:57 -0700 (PDT) Received: from orion.nebula.mil ( [200.44.87.3]) by mx.google.com with ESMTPS id h39sm1099708wxd.2007.09.19.02.28.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 19 Sep 2007 02:28:56 -0700 (PDT) Message-ID: <46F0EBA5.7020802@gmail.com> Date: Wed, 19 Sep 2007 05:28:05 -0400 From: Ighighi User-Agent: Thunderbird 2.0.0.6 (X11/20070803) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: multipart/mixed; boundary="------------070205070500040607020800" Subject: add closefrom() call revisited 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, 19 Sep 2007 09:28:58 -0000 This is a multi-part message in MIME format. --------------070205070500040607020800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Given that NetBSD, OpenBSD and DragonFly (as well as Solaris and maybe others) it'd be nice and worthwhile to implement it too on FreeBSD. The attached shar archive contains 4 possible implementations of it. One, a system call (the approach use by the other BSD's), available here as a loadable kernel module for quick testing. The remaining 3 others are library versions. One of them doesn't currently work since FreeBSD lacks a /proc//fd/ that I tried to emulate with /dev/fd/, both via devfs(5) and fdescfs(5): they seem to lacks some types of file descriptors... Another just does what a lot of programs do: try close() on every possible file descriptor and the other uses sysctl(). The implementation was inspired by the DragonFly code but the semantics match Open/NetBSD's (EBADF vs EINVAL). Their code is available at: http://www.dragonflybsd.org/cvsweb/~checkout~/src/sys/kern/kern_descrip.c http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/kern_descrip.c Also included in the archive is a timing test along with a regression test borrowed from OpenSSH. It was successfully built and tested on FreeBSD 6.2-STABLE. There's code to make it work in -CURRENT. A sample run on a Pentium 4 1.7Ghz: $ make test Trying closefrom_syscall(3) with 58976 open file descriptors user 0.000000 sys 0.030874 total 0.030874 Trying closefrom_syscall(3) with 58976 closed file descriptors user 0.000000 sys 0.000008 total 0.000008 Trying closefrom_sysctl(3) with 58976 open file descriptors user 0.050941 sys 0.045333 total 0.096274 Trying closefrom_sysctl(3) with 58976 closed file descriptors user 0.000877 sys 0.000939 total 0.001816 Trying closefrom_brute(3) with 58976 open file descriptors user 0.037777 sys 0.043793 total 0.081570 Trying closefrom_brute(3) with 58976 closed file descriptors user 0.026666 sys 0.046383 total 0.073049 closefrom_sysctl() has a a worst-case scenario when a lot of files are open that may make it slower than closefrom_brute(). Implementations using /proc//fd/ are also vulnerable to this. With no library version guaranteed to be faster, and because of the various reasons discussed in http://lists.freebsd.org/pipermail/freebsd-hackers/2007-July/thread.html I believe it'd be best to implement it as a system call (which can be done through fcntl() anyway). More info is included in the README. Any ideas, suggestions? Salutes, Igh --------------070205070500040607020800 Content-Type: text/plain; name="closefrom.shar" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="closefrom.shar" #!/bin/sh # This is a shell archive echo x closefrom mkdir -p closefrom > /dev/null 2>&1 echo x closefrom/Makefile sed 's/^X//' > closefrom/Makefile << 'SHAR_END' XSUBDIR = module test X X.include SHAR_END echo x closefrom/README sed 's/^X//' > closefrom/README << 'SHAR_END' XOVERVIEW X XThis tarball contains 4 possible implementations of closefrom(). XThe first, a system call, is located in ./module/syscall.c and is Xavailable as a kernel module for quick testing. X XBoth NetBSD >= 3.0 and DragonFly >= 1.4 implement it as a system call. XIn NetBSD, it uses the F_CLOSEM fcntl(), available since version 2.0. X XThe second, implemented with the kern.file sysctl(), is available Xon both FreeBSD >= 5.0 and DragonFly >= 1.2. Dynamic memory should be Xallocated for an array of "struct xfile" structures that describes each Xopen file descriptor open file descriptor _for every running process_ in Xthe system...! (Note: the sysctl(3) manpage should be patched to reflect Xthe current behaviour since FreeBSD 5.0: it should mention struct xfile). XIn my system, the size of this structure is 52 bytes, so it could fail Xon systems that setup a larger kern.maxfiles. This function would be Xcleaner to implement in NetBSD which has an (undocumented) kern.file2 Xthat lets you work with a specific pid instead by passing KERN_FILE_BYPID. X XThe third is the usual brute force approach that uses getdtablesize(), Xused for reference on the approach most applications take. X XThe fourth tries to do what some implementations (including Solaris') do Xby browsing /proc//fd/ but using /dev/fd/. Unfortunately, it doesn't Xwork because neither devfs(5) nor fdescfs(5) seem to include duplicated Xfile descriptors, sockets and maybe others. X X-o- X XIt was successfully built and tested on FreeBSD 6.2-STABLE (as of XSept, 18 2007), though code that should work on -CURRENT is present X(namely, the new FILEDESC_S[UN]LOCK macros). X XTo try the implementations, run these commands as follows: X Xcd module Xmake Xsudo make load Xcd .. Xcd test Xmake Xmake check Xmake test X XFor repeated testing of any of the implementations you may run: X./closefrom syscall X./closefrom sysctl X./closefrom brute X SHAR_END echo x closefrom/module mkdir -p closefrom/module > /dev/null 2>&1 echo x closefrom/test mkdir -p closefrom/test > /dev/null 2>&1 echo x closefrom/test/closefrom.c sed 's/^X//' > closefrom/test/closefrom.c << 'SHAR_END' X/* X * Copyright (c) 2007 by Ighighi X * All rights reserved. X * X * Redistribution and use in source and binary forms, with or without X * modification, are permitted provided that the following conditions X * are met: X * X * 1. Redistributions of source code must retain the above copyright X * notice, this list of conditions and the following disclaimer. X * 2. Redistributions in binary form must reproduce the above copyright X * notice, this list of conditions and the following disclaimer in the X * documentation and/or other materials provided with the distribution. X * X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, X * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY X * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL X * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, X * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, X * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; X * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, X * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR X * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF X * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. X */ X X#include X#include X#include X#include X#include X#include X#include X#include X#include X#include X#include X#include X#include X#include X#include X X#include X#include X X#define DEBUG X Xstatic void Xusage(const char *argv0) X{ X fprintf(stderr, "Usage: %s syscall|sysctl|brute|devfd\n" X "Usage: %s check\n", argv0, argv0); X exit(1); X} X Xstatic int (*closefrom)(int); /* pointer to closefrom_xxx() */ X X/* X * LKM version of closefrom() X */ X Xstatic int syscall_num; X Xstatic void Xfind_module(void) X{ X struct module_stat stat; X int modid; X X modid = modfind("closefrom"); X if (modid == -1) X err(1, "modfind(closefrom)"); X X stat.version = sizeof(stat); X if (modstat(modid, &stat) == -1) X err(1, "modstat()"); X X syscall_num = stat.data.intval; X} X Xstatic int Xclosefrom_syscall(int lowfd) X{ X return (syscall(syscall_num, lowfd)); X} X X/* X * This version uses the kern.file sysctl() X */ Xstatic int Xclosefrom_sysctl(int lowfd) X{ X int mib[2] = { CTL_KERN, KERN_FILE }; X struct xfile *files = NULL; X pid_t pid = getpid(); X size_t fsize; X int i, nfiles; X X if (lowfd < 0) { X errno = EBADF; X return (-1); X } X X for (;;) { X if (sysctl(mib, 2, files, &fsize, NULL, 0) == -1) { X if (errno != ENOMEM) X goto bad; X else if (files != NULL) { X free(files); X files = NULL; X } X } else if (files == NULL) { X files = (struct xfile *) malloc(fsize); X if (files == NULL) X return (-1); X } else X break; X } X X /* XXX This structure may change */ X if (files->xf_size != sizeof(struct xfile) || X fsize % sizeof(struct xfile)) X { X errno = ENOSYS; X goto bad; X } X X nfiles = fsize / sizeof(struct xfile); X X for (i = 0; i < nfiles; i++) X if (files[i].xf_pid == pid && files[i].xf_fd >= lowfd) X if (close(files[i].xf_fd) < 0 && errno == EINTR) X goto bad; X X free(files); X return (0); X Xbad: X if (files != NULL) { X int save_errno = errno; X free(files); X errno = save_errno; X } X return (-1); X} X X/* X * This version iterates over all possible file descriptors >= lowfd X */ Xstatic int Xclosefrom_brute(int lowfd) X{ X int fd; X X if (lowfd < 0) { X errno = EBADF; X return (-1); X } X X for (fd = getdtablesize(); fd >= lowfd; fd--) X if (close(fd) < 0 && errno == EINTR) X return (-1); X X return (0); X} X X/* X * An example implementation using /dev/fd (other systems use /proc//fd) X * Unfortunately, on FreeBSD, fdescf(5) doesn't include duplicated file X * descriptors and sockets. X */ Xstatic int Xclosefrom_devfd(int lowfd) X{ X struct dirent *d; X DIR *dir; X int fd; X X if (lowfd < 0) { X errno = EBADF; X return (-1); X } X X /* X * Close lowfd so we have a spare fd to use with /dev/fd X */ X close(lowfd++); X X if ((dir = opendir("/dev/fd")) == NULL) X return (-1); X X while ((d = readdir(dir)) != NULL) { X#ifdef DEBUG X printf("%s\n", d->d_name); X#endif X if (d->d_name[0] == '.') X continue; X fd = atoi(d->d_name); X if (fd >= lowfd && fd != dirfd(dir)) X if (close(fd) < 0 && errno == EINTR) X goto bad; X } X X (void)closedir(dir); X return (0); X Xbad: X { X int save_errno = errno; X (void)closedir(dir); X errno = save_errno; X return (-1); X } X} X Xstatic void Xtime_closefrom(int lowfd) X{ X struct rusage ru, rux; X struct timeval tv; X double usecs, ssecs; X X if (getrusage(RUSAGE_SELF, &ru) < 0) X err(1, "getrusage()"); X if (closefrom(lowfd) < 0) X err(1, "closefrom()"); X if (getrusage(RUSAGE_SELF, &rux) < 0) X err(1, "getrusage()"); X X timersub(&rux.ru_utime, &ru.ru_utime, &tv); X usecs = ((double)tv.tv_sec + (double)tv.tv_usec / 1000000); X printf("user\t%f\t", usecs); X timersub(&rux.ru_stime, &ru.ru_stime, &tv); X ssecs = ((double)tv.tv_sec + (double)tv.tv_usec / 1000000); X printf("sys\t%f\t", ssecs); X usecs += ssecs; X printf("total\t%f\n", usecs); X} X Xstatic void Xtry(int (*xclosefrom)(int), const char *str) X{ X int fd, lowfd, maxfd; X X lowfd = dup(STDIN_FILENO); X maxfd = getdtablesize(); X for (fd = 1; fd < maxfd; fd++) X if (dup(STDIN_FILENO) < 0) X break; X X closefrom = xclosefrom; X printf("Trying %s(%d) with %d open file descriptors\n", str, lowfd, fd); X time_closefrom(lowfd); X X printf("Trying %s(%d) with %d closed file descriptors\n", str, lowfd, fd); X time_closefrom(lowfd); X printf("\n"); X} X Xint test(int (*)(int)); X Xint Xmain(int argc, char *argv[]) X{ X if (argv[1] == NULL) X usage(argv[0]); X X if (!strcmp(argv[1], "check")) { X find_module(); X printf("testing closefrom_syscall():\t%s\n", X test(&closefrom_syscall) ? "failed" : "ok"); X printf("testing closefrom_sysctl():\t%s\n", X test(&closefrom_sysctl) ? "failed" : "ok"); X printf("testing closefrom_brute():\t%s\n", X test(&closefrom_brute) ? "failed" : "ok"); X } X else if (!strcmp(argv[1], "syscall")) { X find_module(); X try(&closefrom_syscall, "closefrom_syscall"); X } X else if (!strcmp(argv[1], "sysctl")) X try(&closefrom_sysctl, "closefrom_sysctl"); X else if (!strcmp(argv[1], "devfd")) X try(&closefrom_devfd, "closefrom_devfd"); X else if (!strcmp(argv[1], "brute")) X try(&closefrom_brute, "closefrom_brute"); X else X usage(argv[0]); X X return (0); X} X X/* X * NOTE: X * The following code was adapted from OpenSSH's X * openbsd-compat/regress/closefromtest.c X */ X X/* X * Copyright (c) 2006 Darren Tucker X * X * Permission to use, copy, modify, and distribute this software for any X * purpose with or without fee is hereby granted, provided that the above X * copyright notice and this permission notice appear in all copies. X * X * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES X * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF X * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR X * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES X * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN X * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF X * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. X */ X X#define NUM_OPENS 10 X X#define fail(str) \ X do { printf("%s\n", (str)); \ X return -1; } while(0) X Xint Xtest(int (*xclosefrom)(int)) X{ X int i, max, fds[NUM_OPENS]; X char buf[512]; X X for (i = 0; i < NUM_OPENS; i++) X if ((fds[i] = open("/dev/null", O_RDONLY)) == -1) X exit(0); /* can't test */ X max = i - 1; X X /* should close last fd only */ X xclosefrom(fds[max]); X if (close(fds[max]) != -1) X fail("failed to close highest fd"); X X /* make sure we can still use remaining descriptors */ X for (i = 0; i < max; i++) X if (read(fds[i], buf, sizeof(buf)) == -1) X fail("closed descriptors it should not have"); X X /* should close all fds */ X xclosefrom(fds[0]); X for (i = 0; i < NUM_OPENS; i++) X if (close(fds[i]) != -1) X fail("failed to close from lowest fd"); X X return 0; X} SHAR_END echo x closefrom/test/Makefile sed 's/^X//' > closefrom/test/Makefile << 'SHAR_END' XPROG = closefrom XNO_MAN = X XCFLAGS = -Wall -O2 X Xcheck: ${PROG} X @./${PROG} check X Xtest: ${PROG} X @./${PROG} syscall X @./${PROG} sysctl X @./${PROG} brute X X.include SHAR_END echo x closefrom/module/Makefile mkdir -p closefrom/module > /dev/null 2>&1 sed 's/^X//' > closefrom/module/Makefile << 'SHAR_END' XKMOD = syscall XSRCS = syscall.c vnode_if.h X XCFLAGS += -Wall X Xreload: X @${MAKE} unload X @${MAKE} load X X.include SHAR_END echo x closefrom/module/syscall.c sed 's/^X//' > closefrom/module/syscall.c << 'SHAR_END' X/* X * Copyright (c) 2007 by Ighighi X * All rights reserved. X * X * Redistribution and use in source and binary forms, with or without X * modification, are permitted provided that the following conditions X * are met: X * X * 1. Redistributions of source code must retain the above copyright X * notice, this list of conditions and the following disclaimer. X * 2. Redistributions in binary form must reproduce the above copyright X * notice, this list of conditions and the following disclaimer in the X * documentation and/or other materials provided with the distribution. X * X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, X * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY X * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL X * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, X * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, X * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; X * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, X * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR X * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF X * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. X */ X X#include X#include X#include X#include X#include X#include X#include X#include X#include X#include X X/* X * Newer code in FreeBSD > 6.2 use shared/exclusive locks X */ X#ifndef FILEDESC_SLOCK X#define FILEDESC_SLOCK FILEDESC_LOCK_FAST X#define FILEDESC_SUNLOCK FILEDESC_UNLOCK_FAST X#endif X X/* X * kern_closefrom() X */ Xstatic int Xkern_closefrom(struct thread *td, int lowfd) X{ X struct filedesc *fdp; X int fd; X X /* X * Note: NetBSD uses EBADF and Dragonly uses (undocumented) EINVAL X */ X if (lowfd < 0) X return (EBADF); X X fdp = td->td_proc->p_fd; X X FILEDESC_SLOCK(fdp); X while ((fd = fdp->fd_lastfile) >= lowfd) { X FILEDESC_SUNLOCK(fdp); X if (kern_close(td, fd) == EINTR) X return (EINTR); X FILEDESC_SLOCK(fdp); X } X FILEDESC_SUNLOCK(fdp); X X return (0); X} X X/* closefrom() arguments */ Xstruct closefrom_args { X int fd; X}; X Xstatic int Xclosefrom(struct thread *td, void *args) X{ X struct closefrom_args *uap = (struct closefrom_args *)args; X X return (kern_closefrom(td, uap->fd)); X} X X/* closefrom() sysent[] */ Xstatic struct sysent closefrom_sysent = { X 1, /* number of arguments */ X closefrom /* implementing function */ X}; X X/* X * LKM stuff X */ X X/* offset in sysent[] where the syscall will be allocated */ Xstatic int offset = NO_SYSCALL; X Xstatic int Xload(struct module *module, int cmd, void *arg) X{ X int error = 0; X X switch (cmd) { X case MOD_LOAD: X uprintf("closefrom loaded at offset %d\n", offset); X break; X X case MOD_UNLOAD: X uprintf("closefrom unloaded from offset %d\n", offset); X break; X X default: X error = EOPNOTSUPP; X break; X } X X return (error); X} X XSYSCALL_MODULE(closefrom, &offset, &closefrom_sysent, load, NULL); SHAR_END exit --------------070205070500040607020800-- From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 10:17:14 2007 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 DE78E16A41B for ; Wed, 19 Sep 2007 10:17:14 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 805C413C467 for ; Wed, 19 Sep 2007 10:17:14 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A54503.dip.t-dialin.net [84.165.69.3]) by redbull.bpaserver.net (Postfix) with ESMTP id 3E0152E0D9; Wed, 19 Sep 2007 11:58:05 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id EEA025B4812; Wed, 19 Sep 2007 11:57:38 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.1/8.13.8/Submit) id l8J9vcO1043600; Wed, 19 Sep 2007 11:57:38 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Wed, 19 Sep 2007 11:57:38 +0200 Message-ID: <20070919115738.mygln5az9k4kkko4@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Wed, 19 Sep 2007 11:57:38 +0200 From: Alexander Leidinger To: James Gritton References: <46F03D10.2070607@gritton.org> In-Reply-To: <46F03D10.2070607@gritton.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) / FreeBSD-7.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.9, required 8, BAYES_00 -15.00, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Wed, 19 Sep 2007 12:49:25 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-jail@freebsd.org Subject: Re: Hierarchical jails - any current work? 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, 19 Sep 2007 10:17:15 -0000 Quoting James Gritton (from Tue, 18 Sep 2007 15:03:12 -0600): > I've been doing some work on a hierarchical jail setup, but I've got > this nagging feeling it's been done before. Does anyone know of such > an existing project? If not, I'll put forward my own code. At http://perforce.freebsd.org/branchView.cgi?BRANCH=cdjones%5fjail%5fcurrent are changes to improve jails. I don't know if it does what you want, as you haven't described how hierarchical jails are supposed to work. For infor what is available there, I suggest to ask cdjones. Bye, Alexander. -- HUGH BEAUMONT died in 1982!! http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 15:24:49 2007 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 9B0FE16A417; Wed, 19 Sep 2007 15:24:49 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 41F6F13C45B; Wed, 19 Sep 2007 15:24:49 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id E203545E97; Wed, 19 Sep 2007 16:53:16 +0200 (CEST) Received: from localhost (unknown [194.182.142.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 50DA945B26; Wed, 19 Sep 2007 16:53:09 +0200 (CEST) Date: Wed, 19 Sep 2007 16:51:43 +0200 From: Pawel Jakub Dawidek To: James Gritton Message-ID: <20070919145143.GD965@garage.freebsd.pl> References: <46F03D10.2070607@gritton.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zjcmjzIkjQU2rmur" Content-Disposition: inline In-Reply-To: <46F03D10.2070607@gritton.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-hackers@freebsd.org, freebsd-jail@freebsd.org Subject: Re: Hierarchical jails - any current work? 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, 19 Sep 2007 15:24:49 -0000 --zjcmjzIkjQU2rmur Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 18, 2007 at 03:03:12PM -0600, James Gritton wrote: > I've been doing some work on a hierarchical jail setup, but I've got > this nagging feeling it's been done before. Does anyone know of such > an existing project? If not, I'll put forward my own code. Something like this: http://garage.freebsd.pl/mljail.README I did it some time ago, and this is one of the feature for new jail implementation with is beeing designed. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --zjcmjzIkjQU2rmur Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFG8Td/ForvXbEpPzQRArobAKCV+LdK1Lk0CYTTBSN39tH+tIrGaACgp6N9 qn5vSZ9ztKvCV2P5PYRjueQ= =dvFZ -----END PGP SIGNATURE----- --zjcmjzIkjQU2rmur-- From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 17:54:32 2007 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 9F83C16A46E; Wed, 19 Sep 2007 17:54:32 +0000 (UTC) (envelope-from kevin@insidesystems.net) Received: from imap.insidesystems.net (imap.insidesystems.net [205.246.16.51]) by mx1.freebsd.org (Postfix) with ESMTP id 6BADA13C4B7; Wed, 19 Sep 2007 17:54:32 +0000 (UTC) (envelope-from kevin@insidesystems.net) Received: from [68.32.227.193] (helo=[10.0.1.3]) by imap.insidesystems.net with esmtpa (Exim 4.67 (FreeBSD)) (envelope-from ) id 1IY3UA-000Ku9-0A; Wed, 19 Sep 2007 17:37:14 +0000 Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Kevin Way Date: Wed, 19 Sep 2007 13:37:12 -0400 To: freebsd-security@freebsd.org X-Mailer: Apple Mail (2.752.3) Cc: freebsd-hackers@freebsd.org Subject: GSSAPI Key Exchange in sshd? 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, 19 Sep 2007 17:54:32 -0000 I'm curious if there are technical (or other) reasons that prevent FreeBSD from adding RFC 4462 (GSSAPI Key Exchange) support to sshd. The MIT Kerberos team first requested this four years ago, and implementation patches have been available for years at: http:// www.sxw.org.uk/computing/patches/openssh.html The author of those patches has offered (without much public response) to allow integration of the patches into the openssh source distribution, so I don't think licensing would be an issue. This would be incredibly useful to me, as it'd remove the burden of site-wide ssh host key distribution. Regards, Kevin Way From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 19:08:23 2007 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 03C4D16A421 for ; Wed, 19 Sep 2007 19:08:23 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outV.internet-mail-service.net (outV.internet-mail-service.net [216.240.47.245]) by mx1.freebsd.org (Postfix) with ESMTP id B5E3813C4B3 for ; Wed, 19 Sep 2007 19:08:22 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Wed, 19 Sep 2007 12:08:21 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id EA44D1263FF; Wed, 19 Sep 2007 12:08:20 -0700 (PDT) Message-ID: <46F173A4.6000703@elischer.org> Date: Wed, 19 Sep 2007 12:08:20 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <46F03D10.2070607@gritton.org> <20070919145143.GD965@garage.freebsd.pl> In-Reply-To: <20070919145143.GD965@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-jail@freebsd.org Subject: Re: Hierarchical jails - any current work? 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, 19 Sep 2007 19:08:23 -0000 Pawel Jakub Dawidek wrote: > On Tue, Sep 18, 2007 at 03:03:12PM -0600, James Gritton wrote: >> I've been doing some work on a hierarchical jail setup, but I've got >> this nagging feeling it's been done before. Does anyone know of such >> an existing project? If not, I'll put forward my own code. > > Something like this: > > http://garage.freebsd.pl/mljail.README > > I did it some time ago, and this is one of the feature for new jail > implementation with is beeing designed. I hope in conjuction with Marko and the vimage stuff, which is already hierarchical. > From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 19:30:51 2007 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 551BB16A418; Wed, 19 Sep 2007 19:30:51 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from gritton.org (gritton.org [161.58.222.4]) by mx1.freebsd.org (Postfix) with ESMTP id 0E1E213C45A; Wed, 19 Sep 2007 19:30:50 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from [10.20.12.66] (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by gritton.org (8.13.6.20060614/8.13.6) with ESMTP id l8JJUnct059865; Wed, 19 Sep 2007 13:30:50 -0600 (MDT) Message-ID: <46F178E4.7050408@gritton.org> Date: Wed, 19 Sep 2007 13:30:44 -0600 From: James Gritton User-Agent: Thunderbird 1.5.0.2 (X11/20060512) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <46F03D10.2070607@gritton.org> <20070919145143.GD965@garage.freebsd.pl> In-Reply-To: <20070919145143.GD965@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, freebsd-jail@FreeBSD.org Subject: Re: Hierarchical jails - any current work? 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, 19 Sep 2007 19:30:51 -0000 Pawel Jakub Dawidek wrote: > Something like this: > http://garage.freebsd.pl/mljail.README > > I did it some time ago, and this is one of the feature for new jail > implementation with is beeing designed Yes, that's just the thing I'm talking about, so it looks like I have indeed be reinventing something. (The jail scheduling work of cdjones it something else I'm interested in, but for another time). Now the question becomes: how much jail work is out there, and what's the likelihood is it seeing the light of day in a released kernel? I hate to be going about coding stuff that's been done before (well, actually I enjoy coding it but you know...), but I only ever see snippets of jail work mentioned here and there and nothing ever seems to get anywhere official. I figured the place to talk about this was the freebsd-jail mailing list, but it seems to be mostly for stuff like "getting app X to work in a jail" or "the current jail rc scripts have this or that deficiency." That's why I cross-mailed to freebsd-hackers - maybe more appropriate there? Where's the secret place people really go to communicate this kind of thing? I've done a lot of work in the general jail-like area, and while much of it it the same as others' I'd like to share what isn't. Of course, with other people's jail-related projects staying on the sidelines so long - and that by those with "@freebsd.org" stature - one wonders if there's a point. I don't mean to sound down on anything, just wondering what the state of the "jail community" is. Or where it is. - Jamie From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 20:08:27 2007 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 2194516A468 for ; Wed, 19 Sep 2007 20:08:27 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outC.internet-mail-service.net (outC.internet-mail-service.net [216.240.47.226]) by mx1.freebsd.org (Postfix) with ESMTP id B42B813C45E for ; Wed, 19 Sep 2007 20:08:26 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Wed, 19 Sep 2007 13:08:25 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id 360F71263D3; Wed, 19 Sep 2007 13:08:25 -0700 (PDT) Message-ID: <46F181B7.6080803@elischer.org> Date: Wed, 19 Sep 2007 13:08:23 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: James Gritton References: <46F03D10.2070607@gritton.org> <20070919145143.GD965@garage.freebsd.pl> <46F178E4.7050408@gritton.org> In-Reply-To: <46F178E4.7050408@gritton.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, freebsd-jail@FreeBSD.org, Pawel Jakub Dawidek Subject: Re: Hierarchical jails - any current work? 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, 19 Sep 2007 20:08:27 -0000 James Gritton wrote: > Pawel Jakub Dawidek wrote: >> Something like this: >> http://garage.freebsd.pl/mljail.README >> >> I did it some time ago, and this is one of the feature for new jail >> implementation with is beeing designed > > Yes, that's just the thing I'm talking about, so it looks like I have > indeed be reinventing something. (The jail scheduling work of cdjones > it something else I'm interested in, but for another time). > > Now the question becomes: how much jail work is out there, and what's > the likelihood is it seeing the light of day in a released kernel? I > hate to be going about coding stuff that's been done before (well, > actually I enjoy coding it but you know...), but I only ever see > snippets of jail work mentioned here and there and nothing ever seems to > get anywhere official. I figured the place to talk about this was the > freebsd-jail mailing list, but it seems to be mostly for stuff like > "getting app X to work in a jail" or "the current jail rc scripts have > this or that deficiency." That's why I cross-mailed to freebsd-hackers > - maybe more appropriate there? > > Where's the secret place people really go to communicate this kind of > thing? I've done a lot of work in the general jail-like area, and while > much of it it the same as others' I'd like to share what isn't. Of > course, with other people's jail-related projects staying on the > sidelines so long - and that by those with "@freebsd.org" stature - one > wonders if there's a point. I don't mean to sound down on anything, > just wondering what the state of the "jail community" is. Or where it is. > please please please familiarise yourself with the Vimage code that Marko Zec is working on. It is a superset of jails and all future virtualisation work at this level (as oppposed to Xen or vmware etc.) should be done in co-operation so that a generic framework is used. marko has done some of this already and his code utilises some of the existing Jail frameowork. > - Jamie > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 20:18:48 2007 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 E60CA16A419; Wed, 19 Sep 2007 20:18:48 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from gritton.org (gritton.org [161.58.222.4]) by mx1.freebsd.org (Postfix) with ESMTP id 8772113C457; Wed, 19 Sep 2007 20:18:48 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from [10.20.12.66] (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by gritton.org (8.13.6.20060614/8.13.6) with ESMTP id l8JKIj47061841; Wed, 19 Sep 2007 14:18:45 -0600 (MDT) Message-ID: <46F18420.2060209@gritton.org> Date: Wed, 19 Sep 2007 14:18:40 -0600 From: James Gritton User-Agent: Thunderbird 1.5.0.2 (X11/20060512) MIME-Version: 1.0 To: Julian Elischer References: <46F03D10.2070607@gritton.org> <20070919145143.GD965@garage.freebsd.pl> <46F178E4.7050408@gritton.org> <46F181B7.6080803@elischer.org> In-Reply-To: <46F181B7.6080803@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-jail@freebsd.org Subject: Re: Hierarchical jails - any current work? 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, 19 Sep 2007 20:18:49 -0000 > please please please familiarise yourself with the Vimage code that > Marko Zec is working on. This is the stuff at http://imunes.tel.fer.hr/virtnet/, right? I take it that's the definitive place to go. I recall having looked at that before, and I guess I was thrown off by the "net work virtualization" title and didn't know it was to be a general jail replacement. So sure, I'll give that a thorough study and see what I can do with it. I still hope I can contribute and not just have bothered you all to just end up being another user :-). - Jamie From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 20:28:43 2007 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 48C2816A41A for ; Wed, 19 Sep 2007 20:28:43 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outH.internet-mail-service.net (outH.internet-mail-service.net [216.240.47.231]) by mx1.freebsd.org (Postfix) with ESMTP id EF1CD13C45E for ; Wed, 19 Sep 2007 20:28:41 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Wed, 19 Sep 2007 13:28:40 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id 09E50126428; Wed, 19 Sep 2007 13:28:39 -0700 (PDT) Message-ID: <46F18676.5050507@elischer.org> Date: Wed, 19 Sep 2007 13:28:38 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: James Gritton References: <46F03D10.2070607@gritton.org> <20070919145143.GD965@garage.freebsd.pl> <46F178E4.7050408@gritton.org> <46F181B7.6080803@elischer.org> <46F18420.2060209@gritton.org> In-Reply-To: <46F18420.2060209@gritton.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-jail@freebsd.org Subject: Re: Hierarchical jails - any current work? 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, 19 Sep 2007 20:28:43 -0000 James Gritton wrote: >> please please please familiarise yourself with the Vimage code that >> Marko Zec is working on. > > This is the stuff at http://imunes.tel.fer.hr/virtnet/, right? I take > it that's the definitive place to go. I recall having looked at that > before, and I guess I was thrown off by the "net work virtualization" > title and didn't know it was to be a general jail replacement. So sure, > I'll give that a thorough study and see what I can do with it. I still > hope I can contribute and not just have bothered you all to just end up > being another user :-). > > - Jamie Network virualisation is one part of the job.. it uses jail code to provide other separation, but it would be good if the connections were more 'formal'. We should have an official architecture for this sort of thing. Marco has said that one of the things that needs to be done is to spend time integrating it better with the other (read jail) virtualisation code.. That could be your name I hear being called :-) From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 20 06:24:51 2007 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 0933516A419; Thu, 20 Sep 2007 06:24:51 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 3B2A913C45A; Thu, 20 Sep 2007 06:24:49 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id AAD5645E91; Thu, 20 Sep 2007 08:24:47 +0200 (CEST) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id B0E0A456AB; Thu, 20 Sep 2007 08:24:40 +0200 (CEST) Date: Thu, 20 Sep 2007 08:23:13 +0200 From: Pawel Jakub Dawidek To: James Gritton Message-ID: <20070920062313.GA1119@garage.freebsd.pl> References: <46F03D10.2070607@gritton.org> <20070919145143.GD965@garage.freebsd.pl> <46F178E4.7050408@gritton.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SUOF0GtieIMvvwua" Content-Disposition: inline In-Reply-To: <46F178E4.7050408@gritton.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-hackers@FreeBSD.org, freebsd-jail@FreeBSD.org Subject: Re: Hierarchical jails - any current work? 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, 20 Sep 2007 06:24:51 -0000 --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 19, 2007 at 01:30:44PM -0600, James Gritton wrote: > Pawel Jakub Dawidek wrote: > >Something like this: > > http://garage.freebsd.pl/mljail.README > > > >I did it some time ago, and this is one of the feature for new jail > >implementation with is beeing designed >=20 > Yes, that's just the thing I'm talking about, so it looks like I have=20 > indeed be reinventing something. (The jail scheduling work of cdjones=20 > it something else I'm interested in, but for another time). >=20 > Now the question becomes: how much jail work is out there, and what's=20 > the likelihood is it seeing the light of day in a released kernel? I=20 > hate to be going about coding stuff that's been done before (well,=20 > actually I enjoy coding it but you know...), but I only ever see=20 > snippets of jail work mentioned here and there and nothing ever seems to= =20 > get anywhere official. I figured the place to talk about this was the=20 > freebsd-jail mailing list, but it seems to be mostly for stuff like=20 > "getting app X to work in a jail" or "the current jail rc scripts have=20 > this or that deficiency." That's why I cross-mailed to freebsd-hackers= =20 > - maybe more appropriate there? >=20 > Where's the secret place people really go to communicate this kind of=20 > thing? I've done a lot of work in the general jail-like area, and while= =20 > much of it it the same as others' I'd like to share what isn't. Of=20 > course, with other people's jail-related projects staying on the=20 > sidelines so long - and that by those with "@freebsd.org" stature - one= =20 > wonders if there's a point. I don't mean to sound down on anything,=20 > just wondering what the state of the "jail community" is. Or where it is. We are not hidding anything, don't worry:) We just had developers summit in Denmark when we talked about future jail design. We also talked about this at the developers summit in Milan last year. Currently we have the big picture and quite a few details, I wouldn't call it finished project, because it's not, but we moved forward definiately. Once we polish the notes taken at devsummit we will publish them on a wiki page and give some time to the community to comment on that. If you want to work on jails I would hold on before the wiki page is ready, because I suspect there will be a lot of work to do. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --SUOF0GtieIMvvwua Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFG8hHRForvXbEpPzQRAutXAJ9+0XQktu9rDrjmBisOmAf1W00PlwCePYrO 9hIHKmrabHQ5uarnCSI5IZ8= =If+t -----END PGP SIGNATURE----- --SUOF0GtieIMvvwua-- From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 19 21:54:46 2007 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 7DF4F16A417 for ; Wed, 19 Sep 2007 21:54:46 +0000 (UTC) (envelope-from datahead4@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.227]) by mx1.freebsd.org (Postfix) with ESMTP id 3173413C45E for ; Wed, 19 Sep 2007 21:54:46 +0000 (UTC) (envelope-from datahead4@gmail.com) Received: by wx-out-0506.google.com with SMTP id i29so226038wxd for ; Wed, 19 Sep 2007 14:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=p2hrMn7lJmpotocTRqpi6JNKIKiRU8jfM0bZF/aXjKg=; b=jOTNUm0w6M7jIZAhRQTiJ/Uvx1Jvbnqsz4JV2ABR95/wouymG9yda/DBUO1QQmUe8n5yA/n6T64oEAD5R0jiesjgdeWN9z9EW6QAwWt7g6v4rKe/u5zpGTAMsowX3eQUURU3yIs3Ofv7BWubTANF/Urb91tr1fAp68hXV7kejiY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZflFrWgaxJ9id0CHqOzyM64TOj3UHBlqfFtFIyWN96agUUysAkl3yxhLJAyZ+y+Rg+DFEcUaf85hcaWMPbGve4l8zLREcmqVd2UBx8zkK/HEfxOX57R5/VZVhlKBQfQPjcZH7+a8hL4oL1aMRG8cnFJA7ozc5fRvJc6T83EMRPY= Received: by 10.90.81.14 with SMTP id e14mr955519agb.1190237437535; Wed, 19 Sep 2007 14:30:37 -0700 (PDT) Received: by 10.90.106.19 with HTTP; Wed, 19 Sep 2007 14:30:37 -0700 (PDT) Message-ID: Date: Wed, 19 Sep 2007 16:30:37 -0500 From: Matt To: "Matt Olander" In-Reply-To: <200709041048.41892.matt@ixsystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200709041048.41892.matt@ixsystems.com> X-Mailman-Approved-At: Thu, 20 Sep 2007 07:17:39 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, Ivan Voras , Jeremy Messenger Subject: Re: VirtualBox? 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, 19 Sep 2007 21:54:46 -0000 On 9/4/07, Matt Olander wrote: > On Tuesday 04 September 2007 8:27 am, Jeremy Messenger wrote: > > On Tue, 04 Sep 2007 08:33:50 -0500, Ivan Voras wrote: > > > Hi, > > > > > > Is anyone working on porting VirtualBox? > > > > > > http://www.virtualbox.org/wiki/Porting_VirtualBox > > > > > > It mentions FreeBSD but nothing conclusive. It should be easier than > > > VMWare :) > > > > http://www.virtualbox.org/wiki/VBox_vs_Others (see in host box) > > http://www.virtualbox.org/wiki/FreeBSD%20build%20instructions > > http://www.virtualbox.org/search?q=freebsd&wiki=on&changeset=on&ticket=on > > > > It looks like they are working on it. > > I spoke with a couple of their devs on Freenode and while they are willing to > assist contributors porting to FreeBSD, they are not actively working on it > themselves. Their response to my inquiry was "check out source and start > porting!" > > A few of their devs hang out in #vbox-dev on Freenode. This would be an > excellent port for FreeBSD. > > best, > -matt > > -- I agree that this would be an excellent addition to the FreeBSD toolset. We use it on several Linux and Windows host machines and it is quite good. There has been some additional porting work of late and the VirtualBox devs have been quick to import suggestions into their subversion tree. The result is that VirtualBox now builds successfully on FreeBSD version 6.2 and 7-CURRENT with only minor patches (and those should hopefully go away soon too). However, the kernel driver (and some other things too) are missing and need additional work. Is there anyone here capable of helping with that effort? Regards, Matt From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 20 07:33:11 2007 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 9B30D16A418 for ; Thu, 20 Sep 2007 07:33:11 +0000 (UTC) (envelope-from idefix@fechner.net) Received: from anny.lostinspace.de (anny.ipv6.lostinspace.de [IPv6:2a01:138:100:1:219:d1ff:fe6a:ef49]) by mx1.freebsd.org (Postfix) with ESMTP id C60AE13C478 for ; Thu, 20 Sep 2007 07:33:10 +0000 (UTC) (envelope-from idefix@fechner.net) Received: from server.idefix.lan (ppp-82-135-85-62.dynamic.mnet-online.de [82.135.85.62]) (authenticated bits=0) by anny.lostinspace.de (8.14.1/8.14.1) with ESMTP id l8K7X0Xc001744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 20 Sep 2007 09:33:06 +0200 (CEST) (envelope-from idefix@fechner.net) Received: from idefix.idefix.lan ([192.168.0.151]) by server.idefix.lan with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68 (FreeBSD)) (envelope-from ) id 1IYGWD-000NGp-89 for freebsd-hackers@freebsd.org; Thu, 20 Sep 2007 09:32:17 +0200 Message-ID: <46F22228.5070203@fechner.net> Date: Thu, 20 Sep 2007 09:32:56 +0200 From: Matthias Fechner User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.95.3 Content-Type: multipart/mixed; boundary="------------060004050308080903060901" X-Spam_score: -4.3 X-Spam_score_int: -42 X-Spam_bar: ---- X-Spam_host: idefix.fechner.net X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (anny.lostinspace.de [80.190.182.2]); Thu, 20 Sep 2007 09:33:06 +0200 (CEST) X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on anny.lostinspace.de X-Virus-Scanned: ClamAV 0.91.2/4349/Thu Sep 20 00:46:46 2007 on anny.lostinspace.de X-Virus-Status: Clean Subject: Own Install CD with custom 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: Thu, 20 Sep 2007 07:33:11 -0000 This is a multi-part message in MIME format. --------------060004050308080903060901 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, I'm new to that list and I hope it is the right own to rise my question :) I'm working currently on a custom FreeBSD install CD with included I4B. But I have my problems and every try takes about 8 hours to rebuild the CDs again so hopefully I'll get some help here to speed it up a little :) What I did: Prepared my environment like (checkout cvs, copy files, created patch etc. - default FreeBSD CDs builds fine) It seems that sysinstall will not install per default the new kernel. For a non SMP system (like mine) it is I4B. So it seems to me that I must change /usr/src/usr.sbin/sysinstall to do this. I attached a patch to this email which should do it. cd /usr/src/release make release CHROOTDIR=/home/storage/ownfreebsd BUILDNAME=FreeBSD-I4B \ CVSROOT=/home/storage/ncvs RELEASETAG=RELENG_6 MAKE_ISOS=1 \ KERNEL_FLAGS=-j4 WORLD_FLAGS=-j4 \ LOCAL_PATCHES=/root/patch.diff PATCH_FLAGS=-p1 \ KERNELS="I4B I4BSMP GENERIC SMP" |tee /root/build.log Then I execute the make release command and some hours later I got all the ISOs I need to install my new system. Ok so far so good. Now I booted with the new created ISO and try to install from it. I checked if the right kernel is select in the distribution selection and yes that is fine. But at the installation itself it seems that sysinstall is not copying the kernel to the right place. I got the following message (debugging messages in sysinstall are enabled): DEBUG: installFixupKernel: Install I4B kernel DEBUG: Executing command 'mv /boot/I4B /boot/kernel' mv: rename /boot/I4B to /boot/kernel: No such file or directory DEBUG: Command 'mv /boot/I4B /boot/kernel' ressturns status of 1 I checked now the the installed system and there is absolutly no kernel installed. (no /boot/GENERIC, no /boot/I4B or anything else) I'm sure that I must oversaw something in sysinstall to change but I cannot find it. Can please anyone provide with some help? Thx a lot! Best regards, Matthias -- "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." -- Rich Cook --------------060004050308080903060901 Content-Type: text/x-diff; name="sysinstall_kernel_I4B.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sysinstall_kernel_I4B.diff" diff -Nur src.orig/usr.sbin/sysinstall/Makefile src/usr.sbin/sysinstall/Makefile --- src.orig/usr.sbin/sysinstall/Makefile 2006-03-11 19:52:47.000000000 +0100 +++ src/usr.sbin/sysinstall/Makefile 2007-09-05 07:38:50.000000000 +0200 @@ -50,6 +50,9 @@ .if exists(${.CURDIR}/../../sys/${MACHINE}/conf/SMP) CFLAGS+=-DWITH_SMP .endif +.if exists(${.CURDIR}/../../sys/${MACHINE}/conf/I4B) +CFLAGS+=-DWITH_I4B +.endif DPADD+= ${LIBDEVINFO} LDADD+= -ldevinfo .endif diff -Nur src.orig/usr.sbin/sysinstall/dist.c src/usr.sbin/sysinstall/dist.c --- src.orig/usr.sbin/sysinstall/dist.c 2007-03-30 21:21:56.000000000 +0200 +++ src/usr.sbin/sysinstall/dist.c 2007-09-06 01:37:43.000000000 +0200 @@ -100,8 +100,16 @@ static Distribution KernelDistTable[] = { DTE_TARBALL("GENERIC", &KernelDists, KERNEL_GENERIC, "/boot"), #ifdef WITH_SMP +#ifdef WITH_I4B + DTE_TARBALL("I4BSMP", &KernelDists, KERNEL_I4BSMP, "/boot"), +#else DTE_TARBALL("SMP", &KernelDists, KERNEL_SMP, "/boot"), #endif +#else +#ifdef WITH_I4B + DTE_TARBALL("I4B", &KernelDists, KERNEL_I4B, "/boot"), +#endif +#endif DTE_END, }; @@ -216,11 +224,19 @@ selectKernel(void) { #ifdef WITH_SMP +#ifdef WITH_I4B + return DIST_KERNEL_I4B; +#else /* select default kernel based on deduced cpu count */ return NCpus > 1 ? DIST_KERNEL_SMP : DIST_KERNEL_GENERIC; +#endif +#else +#ifdef WITH_I4B + return DIST_KERNEL_I4B; #else return DIST_KERNEL_GENERIC; #endif +#endif } int diff -Nur src.orig/usr.sbin/sysinstall/dist.h src/usr.sbin/sysinstall/dist.h --- src.orig/usr.sbin/sysinstall/dist.h 2006-03-11 19:52:47.000000000 +0100 +++ src/usr.sbin/sysinstall/dist.h 2007-09-06 01:31:31.000000000 +0200 @@ -74,6 +74,8 @@ /* Subtypes for KERNEL distribution */ #define DIST_KERNEL_GENERIC 0x00001 #define DIST_KERNEL_SMP 0x00002 +#define DIST_KERNEL_I4B 0x00004 +#define DIST_KERNEL_I4BSMP 0x00008 #define DIST_KERNEL_ALL 0xFFFFF /* Canned distribution sets */ diff -Nur src.orig/usr.sbin/sysinstall/install.c src/usr.sbin/sysinstall/install.c --- src.orig/usr.sbin/sysinstall/install.c 2006-12-31 19:34:58.000000000 +0100 +++ src/usr.sbin/sysinstall/install.c 2007-09-15 09:27:35.000000000 +0200 @@ -910,13 +910,30 @@ * NB: we assume any existing kernel has been saved * already and the /boot/kernel we remove is empty. */ + msgDebug("installFixupKernel: Remove /boot/kernel\n"); vsystem("rm -rf /boot/kernel"); -#if WITH_SMP - if (dists & DIST_KERNEL_SMP) + + msgDebug("installFixupKernel: Checking for SMP and I4B\n"); + if (dists & DIST_KERNEL_I4BSMP) + { + msgDebug("installFixupKernel: Install I4BSMP kernel\n"); + vsystem("mv /boot/I4BSMP /boot/kernel"); + } + else if (dists & DIST_KERNEL_SMP) + { + msgDebug("installFixupKernel: Install SMP kernel\n"); vsystem("mv /boot/SMP /boot/kernel"); + } + else if (dists & DIST_KERNEL_I4B) + { + msgDebug("installFixupKernel: Install I4B kernel\n"); + vsystem("mv /boot/I4B /boot/kernel"); + } else -#endif + { + msgDebug("installFixupKernel: Install GENERIC kernel\n"); vsystem("mv /boot/GENERIC /boot/kernel"); + } } return DITEM_SUCCESS | DITEM_RESTORE; } diff -Nur src.orig/usr.sbin/sysinstall/menus.c src/usr.sbin/sysinstall/menus.c --- src.orig/usr.sbin/sysinstall/menus.c 2007-05-26 09:31:47.000000000 +0200 +++ src/usr.sbin/sysinstall/menus.c 2007-09-06 01:38:13.000000000 +0200 @@ -1045,9 +1045,18 @@ { " GENERIC", "GENERIC kernel configuration", dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_GENERIC }, #ifdef WITH_SMP +#ifdef WITH_I4B + { " I4BSMP", "I4B symmetric multiprocessor kernel configuration", + dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_I4BSMP }, +#else { " SMP", "GENERIC symmetric multiprocessor kernel configuration", dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_SMP }, #endif +#endif +#ifdef WITH_I4B + { " I4B", "I4B kernel configuration", + dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_I4B }, +#endif { NULL } }, }; diff -Nur src.orig/usr.sbin/sysinstall/system.c src/usr.sbin/sysinstall/system.c --- src.orig/usr.sbin/sysinstall/system.c 2005-08-17 15:32:29.000000000 +0200 +++ src/usr.sbin/sysinstall/system.c 2007-09-14 08:40:25.000000000 +0200 @@ -143,6 +143,7 @@ if (!sysctlbyname("debug.boothowto", &boothowto, &i, NULL, 0) && (i == sizeof(boothowto)) && (boothowto & RB_VERBOSE)) variable_set2(VAR_DEBUG, "YES", 0); + variable_set2(VAR_DEBUG, "YES", 0); /* Are we running as init? */ if (getpid() == 1) { --------------060004050308080903060901-- From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 20 08:21:49 2007 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 D2B4516A417 for ; Thu, 20 Sep 2007 08:21:49 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 6E6A213C457 for ; Thu, 20 Sep 2007 08:21:49 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id E6A6E1B10EE2; Thu, 20 Sep 2007 10:21:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-104.4 required=5.0 tests=ALL_TRUSTED,BAYES_00, USER_IN_WHITELIST autolearn=ham version=3.2.3 Received: from hater.cmotd.com (hater.cmotd.com [192.168.3.125]) by blah.sun-fish.com (Postfix) with ESMTP id 9AAE51B10EE0; Thu, 20 Sep 2007 10:21:37 +0200 (CEST) Message-ID: <46F22D91.9070104@moneybookers.com> Date: Thu, 20 Sep 2007 11:21:37 +0300 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.6 (X11/20070831) MIME-Version: 1.0 To: Kevin Way References: In-Reply-To: Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/4347/Wed Sep 19 23:01:10 2007 on blah.cmotd.com X-Virus-Status: Clean Cc: freebsd-security@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: GSSAPI Key Exchange in sshd? 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, 20 Sep 2007 08:21:49 -0000 Hello, Kevin Way wrote: > I'm curious if there are technical (or other) reasons that prevent > FreeBSD from adding RFC 4462 (GSSAPI Key Exchange) support to sshd. > The MIT Kerberos team first requested this four years ago, and > implementation patches have been available for years at: > http://www.sxw.org.uk/computing/patches/openssh.html > > The author of those patches has offered (without much public response) > to allow integration of the patches into the openssh source > distribution, so I don't think licensing would be an issue. > > This would be incredibly useful to me, as it'd remove the burden of > site-wide ssh host key distribution. I'm using openssh-portable from ports to do this. It is option there so you have a choice. Unfortunately there is no patch available for the latest (4.7) openssh, so we have to wait little. It was explained many times why you should use ports if you want customization for apps like heimdal, openssh and perl (in the past when it was built-in in the base system). Also it is quite more easy to maintain updates, when you use ports version for this. Why it is not part of openssh I can only guess, but I'm sure it involves security problems (just like HPN patch), and that's why it is not part of the source tree of openssh. > > Regards, > Kevin Way > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" -- Best Wishes, Stefan Lambrev ICQ# 24134177 From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 20 08:50:48 2007 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 5D30C16A420 for ; Thu, 20 Sep 2007 08:50:48 +0000 (UTC) (envelope-from helge.oldach@atosorigin.com) Received: from smtp1.mail.atosorigin.com (smtp1.mail.atosorigin.com [160.92.103.80]) by mx1.freebsd.org (Postfix) with ESMTP id C522013C428 for ; Thu, 20 Sep 2007 08:50:47 +0000 (UTC) (envelope-from helge.oldach@atosorigin.com) Received: from filter.atosorigin.com (localhost [127.0.0.1]) by mxfed004 (Postfix) with ESMTP id 45CB026788AA; Thu, 20 Sep 2007 10:23:42 +0200 (CEST) Received: from mizar.origin-it.net (mail.de.atosorigin.com [194.8.96.234]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by mxfed004 (Postfix) with ESMTP id 226B326788A8; Thu, 20 Sep 2007 10:23:42 +0200 (CEST) Received: from matar.hbg.de.int.atosorigin.com (avior.origin-it.net [213.70.176.177]) by mizar.origin-it.net (8.14.1/8.14.1/hmo020206) with ESMTP id l8K8NfSB017816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 Sep 2007 10:23:44 +0200 (CEST) (envelope-from helge.oldach@atosorigin.com) Received: from DEHHX001.deuser.de.intra (dehhx001.hbg.de.int.atosorigin.com [161.90.164.121]) by matar.hbg.de.int.atosorigin.com (8.14.1/8.14.1/hmo020206) with ESMTP id l8K8NfGf060581; Thu, 20 Sep 2007 10:23:41 +0200 (CEST) (envelope-from helge.oldach@atosorigin.com) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Thu, 20 Sep 2007 10:23:10 +0200 Message-ID: <39AFDF50473FED469B15B6DFF2262F7A03322045@DEHHX001.deuser.de.intra> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: pccard0: Card has no functions! (solved) Thread-Index: Acf6keyWz4OjpTkHRxWT5g2ZhSP4wwAzB9Tg References: <20070816225344.GA67058@icomvision.com> <20070918154514.GA71760@icomvision.com> From: To: , X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (mizar.origin-it.net [194.8.96.234]); Thu, 20 Sep 2007 10:23:44 +0200 (CEST) X-Bogolevel: not-spam X-fed-spamrating: 0.008446 Cc: Subject: RE: pccard0: Card has no functions! (solved) 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, 20 Sep 2007 08:50:48 -0000 Marian Cerny wrote on Tuesday, September 18, 2007 5:45 PM: > On 2007-08-17 00:53 +0200, Marian Cerny wrote: >> I have Nokia Card Phone 2.0 (on a supported HW list) in a PCMCIA to >> PCI adapter. I have used this combination some time ago (2-3 years) >> and it worked without any problems. I don't remember what FreeBSD >> version I used that time.=20 >>=20 >> I tried to get it working under FreeBSD 6.2R today but was not >> successful. I can see those messages after boot: >>=20 >> Status is 0x30000410 >> cbb0: card inserted: event=3D0x00000000, state=3D30000410 >> pccard0: chip_socket_enable >> cbb_pcic_socket_enable: >> cbb0: cbb_power: 5V >> pccard0: read_cis >> cis mem map 0xe7286000 (resource: 0xfe310000) >> pccard0: CIS tuple chain: >> CISTPL_END >> ff >> cis mem map e7286000 >> CISTPL_LINKTARGET expected, code ff observed >> pccard0: check_cis_quirks >> pccard0: Card has no functions! >> cbb0: PC Card card activation failed >=20 > The problem was in the PCI to PCMCIA adapter. It was not able to read > "CIS tuple chain" of any PCMCIA card. I have bought a new adapter, > with=20 > a Ricoh R5C485 chip (the old one had R5C475II) and it works without > any problems. The real problem with the old adapter was not fixed - > however=20 > I consider the problem to be solved. I suspect that this is related to kern/91919. This issue is also related = to a PCI-to-PCCARD adapter. The core issue is that voltage is supplied to the PCCARD in the wrong order, which leads to the PCCARD not showing up. (Note the order has been correct in the FreeBSD-4.11 code, which likely explains why your card has been working in a former release.) It is fixed already in CURRENT since March 2007 - in rev. 1.140 of sys/dev/pccbb/pccbb.c, which actually says MFC after 3 days, but this is another one of the forgotten MFCs... :-) It would probably help us if you could test this fix with your old = board, just to verify. Helge Atos Origin GmbH, Theodor-Althoff-Str. 47, D-45133 Essen, Postfach 100 123, D-45001 Essen Telefon: +49 201 4305 0, Fax: +49 201 4305 689095, www.atosorigin.de ING Bank AG, Frankfurt/Main: Konto 001 014 0937, BLZ 500 210 00, Swift / BIC INGBDEFF, IBAN DE74 5002 1000 0010 1409 37 Geschäftsführer: Dominique Illien, Handelsregister Essen HRB 19354, Ust.-ID.-Nr.: DE147861238 From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 21 16:19:22 2007 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 D0CB716A498 for ; Fri, 21 Sep 2007 16:19:22 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id BCFAE13C48E for ; Fri, 21 Sep 2007 16:19:17 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 72CCC1CC02C; Fri, 21 Sep 2007 09:19:17 -0700 (PDT) Date: Fri, 21 Sep 2007 09:19:17 -0700 From: Jeremy Chadwick To: freebsd-hackers@freebsd.org Message-ID: <20070921161917.GA65081@eos.sc1.parodius.com> Mail-Followup-To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Subject: Serial console/remote install discussion 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, 21 Sep 2007 16:19:22 -0000 I'd like to open up a discussion regarding FreeBSD serial console and the aspect of installation via serial console. There seem to be quite a few surprises in regards to installing (or even using!) FreeBSD this way. I thought I'd mention some of them, in hopes that by bringing them to light we can work towards making the installation process easier, or at least more headless-friendly. 1) Administrators are required to "build their own installation disks" (the Handbook goes over this with regards to floppy disks) if they want FreeBSD installs to support serial console. Based on what I've read, the procedure is required because the stock installation disks lack a /boot.config that contains -h. Has anyone ever proposed including a /boot.config on all the installation mediums that contains -P by default? I don't know how reliable -P is, but I've used it for years on numerous servers (all different hardware) without any issues; others may have different experiences. Which brings me to the next item... 2) FreeBSD's serial vs. VGA concept (keyword: versus) is disheartening. The whole "one or the other" concept is unrealistic in this day and age, and this was more or less admitted by the Dragonfly folks when they re-wrote whatever code to get simultaneous dual console (VGA+serial) working. Matt (Dillon) can probably talk more about this in detail; I remember reading a thread long ago that stated "much work had to be done" to get Dragonfly to do it, and I'm left wondering why we haven't moved that direction with FreeBSD. No offence intended, of course. I consider this feature fairly important, and here's why: there is nothing more annoying than going to the co-lo and having to reboot a running server simply because the actual "console" itself is still considered the serial port. My opinion is that I should be able to use both (VGA or serial) at any time, not "one or the other". 3) Stock kernel serial port speed maximum is still set to 9600bps. For many years I've tried to understand the justification behind this. Out-of-the-box, serial console speeds >9600 cannot be achieved without setting -S115200 in /boot.config or using options CONSPEED=115200 in a kernel config (which only gets you that speed once the kernel is loaded, of course). You supposedly can also say -S0 to tell the bootloader "don't mess with the serial port at all", for systems which have BIOS-level serial console redirection (and retain that ability *after* POST; Supermicro server BIOSes support the toggling of this ability, for example). Documentation for this feature is lacking, but I did see it mentioned in a commit log a while back. There's nothing more unfuriating than installing FreeBSD, editing the /etc/ttys entry for ttyd0 to use 115200, and finding out it's still stuck at 9600bps because of this default limit. I know of quite a few people who never considered doing stty -af /dev/ttyd0 to look at the actual speed. This may indeed be caused by lack of experience, but once the administrator figures out the reason for it and fixes it, the next words out of his/her mouth are almost always "So, uhh, what's with the 9600 default?" That said, can someone explain the justification behind the default? 4) Many administrators (myself included) continue to report that serial console "works great" in one stage, but not in others. I've seen it many times myself; serial output during boot0 and boot2/loader but nothing once the kernel loads, or the exact opposite: total silence until the kernel loads. There's multiple points where FreeBSD messes with the serial port. You've got the BIOS messing with it (on systems which support BIOS-level serial console), boot0sio messing with it (if installed), then boot2/loader messing with it, then the kernel messing with it. All of these things have to be "in tune" with one another or else administrators end up with a serial port that works up until that point. There was even a recent -stable message about this, I believe. There doesn't appear to be any transparent "hand-offs" between one stage and another. So my question is: why aren't we simply initialising the port speed as soon as possible (and only if explicitly told to by an existing boot configuration), such as in boot0 or boot2/loader, and then leaving it alone from then on? If you're reading this and are curious how we do our installs and have our systems set up (all of which are Supermicro): * Install FreeBSD locally (VGA + keyboard + CD) - Choose _not_ to install the FreeBSD bootloader (choice: "None") * Finish the install; system will reboot * After the system is up, edit /boot.config - Contents should be: -S115200 -P * Edit /etc/ttys - Enable ttyd0 - Change std.9600 to std.115200 - Change term type from dialup to xterm (we assume anyone getting on the serial console remotely is using PuTTY or something capable of xterm-like emulation) * Reboot box * Go into BIOS - Enable serial port redirection to COM-A (e.g. COM1, IRQ 4, 0x3F8) - Serial port speed: 115200 - Keep redirection after POST should be DISABLED - Save settings * All done. Take box to co-lo and when powering it up, make sure there's no keyboard attached What this gets us is the ability to go into the BIOS remotely via serial console, as well as manage and maintain a FreeBSD server via serial console. However, the installation itself still requires it to be done via VGA+keyboard. I'd much rather be able to install the OS remotely (telling remote hands to put some CD in the drive and leave the rest to me), especially because a few of our servers need to migrate from RELENG_4 to RELENG_6 (possibly RELENG_7), and I'd rather nuke them/reinstall without having to go to the co-lo. I'll succumb to the argument of PXE booting for initial OS installs (I completely agree with it!), but the above items regarding serial console still stand. That is, unless you enjoy PXE booting blind. :-) Most of the walkthrough I've seen for getting a PXE-based setup configured are for old versions of FreeBSD (4.x or 5.x). The guide alfred@ put together is very useful, but seems to be intended for headless clients and doesn't touch base on serial console configuration pieces. http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 22 09:52:30 2007 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 D446816A419 for ; Sat, 22 Sep 2007 09:52:30 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 913C913C480 for ; Sat, 22 Sep 2007 09:52:30 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 5D54A20A3 for ; Sat, 22 Sep 2007 11:52:23 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 52A772099 for ; Sat, 22 Sep 2007 11:52:23 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 3C8C38448B; Sat, 22 Sep 2007 11:52:23 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: freebsd-hackers@freebsd.org References: <20070921161917.GA65081@eos.sc1.parodius.com> Date: Sat, 22 Sep 2007 11:52:23 +0200 In-Reply-To: <20070921161917.GA65081@eos.sc1.parodius.com> (Jeremy Chadwick's message of "Fri\, 21 Sep 2007 09\:19\:17 -0700") Message-ID: <86myvfqb6w.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Serial console/remote install discussion 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, 22 Sep 2007 09:52:30 -0000 Jeremy Chadwick writes: > I'd like to open up a discussion regarding FreeBSD serial console and > the aspect of installation via serial console. how about you go read loader(8) and loader.conf(5) first? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 22 11:27:33 2007 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 D6FF516A41B for ; Sat, 22 Sep 2007 11:27:33 +0000 (UTC) (envelope-from ap@bnc.net) Received: from mailomat.net (mailomat.net [217.110.117.101]) by mx1.freebsd.org (Postfix) with ESMTP id 3981413C48A for ; Sat, 22 Sep 2007 11:27:32 +0000 (UTC) (envelope-from ap@bnc.net) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on f-1.mailomat.net X-Spam-Level: X-Spam-Status: No, hits=-4.2 required=4.0 tests=ALL_TRUSTED=-1.8, AWL=0.226, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-TFF-CGPSA-Version: 1.5 X-Mailomat-CGPSA-Filter: Scanned X-Mailomat-SpamCatcher-Score: 2 [X] X-Mailomat-Cloudmark-Score: 0.000000 [] Received: from [194.39.192.125] (account bnc-mail@mailrelay.mailomat.net HELO bnc.net) by mailomat.net (CommuniGate Pro SMTP 5.1.9) with ESMTPSA id 28806348; Sat, 22 Sep 2007 12:27:27 +0200 X-BNC-SpamCatcher-Score: 2 [X] Received: from [194.39.194.123] (account ap HELO [194.39.194.123]) by bnc.net (CommuniGate Pro SMTP 5.1.9) with ESMTPSA id 2941733; Sat, 22 Sep 2007 12:27:25 +0200 In-Reply-To: <86myvfqb6w.fsf@ds4.des.no> References: <20070921161917.GA65081@eos.sc1.parodius.com> <86myvfqb6w.fsf@ds4.des.no> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-11--451246521; protocol="application/pkcs7-signature" Message-Id: From: Achim Patzner Date: Sat, 22 Sep 2007 12:27:14 +0200 To: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.752.3) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Serial console/remote install discussion 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, 22 Sep 2007 11:27:34 -0000 --Apple-Mail-11--451246521 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Am 22.09.2007 um 11:52 schrieb Dag-Erling Sm=F8rgrav: > Jeremy Chadwick writes: >> I'd like to open up a discussion regarding FreeBSD serial console and >> the aspect of installation via serial console. > > how about you go read loader(8) and loader.conf(5) first? And the documentation of his server's BIOS (if there is one). I've seen people getting into hip-deep shit using serial console and BIOS VGA-=20 to-serial replication features at the same time... At different data rates. =20 Resulting in really cool side effects. Achim --Apple-Mail-11--451246521-- From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 22 12:12:40 2007 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 879C916A419 for ; Sat, 22 Sep 2007 12:12:40 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id 719CF13C455 for ; Sat, 22 Sep 2007 12:12:40 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 2C8BB1CC02C; Sat, 22 Sep 2007 05:12:40 -0700 (PDT) Date: Sat, 22 Sep 2007 05:12:40 -0700 From: Jeremy Chadwick To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20070922121240.GA98175@eos.sc1.parodius.com> Mail-Followup-To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , freebsd-hackers@freebsd.org References: <20070921161917.GA65081@eos.sc1.parodius.com> <86myvfqb6w.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86myvfqb6w.fsf@ds4.des.no> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-hackers@freebsd.org Subject: Re: Serial console/remote install discussion 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, 22 Sep 2007 12:12:40 -0000 On Sat, Sep 22, 2007 at 11:52:23AM +0200, Dag-Erling Smørgrav wrote: > Jeremy Chadwick writes: > > I'd like to open up a discussion regarding FreeBSD serial console and > > the aspect of installation via serial console. > > how about you go read loader(8) and loader.conf(5) first? I've read them, thoroughly, and many times over the years. What exactly is your point in saying this? Did you read *anything* I wrote? :-) -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 22 12:31:19 2007 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 DC32F16A418 for ; Sat, 22 Sep 2007 12:31:19 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id C47CC13C481 for ; Sat, 22 Sep 2007 12:31:19 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id C74BA1CC02B; Sat, 22 Sep 2007 05:31:19 -0700 (PDT) Date: Sat, 22 Sep 2007 05:31:19 -0700 From: Jeremy Chadwick To: Achim Patzner Message-ID: <20070922123119.GB98175@eos.sc1.parodius.com> Mail-Followup-To: Achim Patzner , Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , freebsd-hackers@freebsd.org References: <20070921161917.GA65081@eos.sc1.parodius.com> <86myvfqb6w.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , freebsd-hackers@freebsd.org Subject: Re: Serial console/remote install discussion 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, 22 Sep 2007 12:31:19 -0000 On Sat, Sep 22, 2007 at 12:27:14PM +0200, Achim Patzner wrote: > Am 22.09.2007 um 11:52 schrieb Dag-Erling Smørgrav: >> Jeremy Chadwick writes: >>> I'd like to open up a discussion regarding FreeBSD serial console and >>> the aspect of installation via serial console. >> >> how about you go read loader(8) and loader.conf(5) first? > > And the documentation of his server's BIOS (if there is one). I've seen > people getting into hip-deep shit using serial console and BIOS > VGA-to-serial replication features at the same time... At different data > rates. Resulting in really cool side effects. I can imagine the result would be fairly amusing, but it ultimately depends on how the vendor implements the whole VGA-to-serial aspect of things. For example, I think Rackable's systems (using the Phantom) do things quite a bit differently than Supermicro. The generic walk-through description I gave at the bottom of my mail for Supermicro servers works reliably on pretty much all models made over the past 3 years. BIOS-level serial redirection is immediately released after POST, which means FreeBSD (boot0sio (optional), boot2/loader, and the kernel) are responsible from that point onwards. I totally agree that letting the BIOS handle everything (re: VGA-to-serial) is a questionable solution/idea, which is probably why Supermicro BIOSes let you configure retaining VGA-to-serial after POST or not. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 22 13:10:26 2007 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 6B3A916A417 for ; Sat, 22 Sep 2007 13:10:26 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id 5309C13C45B for ; Sat, 22 Sep 2007 13:10:26 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 572DA1CC02B; Sat, 22 Sep 2007 06:10:26 -0700 (PDT) Date: Sat, 22 Sep 2007 06:10:26 -0700 From: Jeremy Chadwick To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , freebsd-hackers@freebsd.org Message-ID: <20070922131026.GA98872@eos.sc1.parodius.com> Mail-Followup-To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , freebsd-hackers@freebsd.org References: <20070921161917.GA65081@eos.sc1.parodius.com> <86myvfqb6w.fsf@ds4.des.no> <20070922121240.GA98175@eos.sc1.parodius.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20070922121240.GA98175@eos.sc1.parodius.com> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Subject: Re: Serial console/remote install discussion 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, 22 Sep 2007 13:10:26 -0000 On Sat, Sep 22, 2007 at 05:12:40AM -0700, Jeremy Chadwick wrote: > On Sat, Sep 22, 2007 at 11:52:23AM +0200, Dag-Erling Smørgrav wrote: > > Jeremy Chadwick writes: > > > I'd like to open up a discussion regarding FreeBSD serial console and > > > the aspect of installation via serial console. > > > > how about you go read loader(8) and loader.conf(5) first? > > I've read them, thoroughly, and many times over the years. What exactly > is your point in saying this? Did you read *anything* I wrote? :-) I'll retract this statement entirely, and apologise profusely. It seems lots of documentation (both manpages and the Handbook) have been updated since the last time I sat down and thoroughly read them. Regarding Item #2 ("FreeBSD serial vs. VGA") in my original mail: The loader(8) manpage talks about a 'boot_multicons' option, and refers you to conscontrol(8); I hadn't heard of these until now. Regarding Item #3 ("Stock serial port speed 9600bps") and Item #4 ("serial works great in one stage but not the next") in my original mail: The loader.conf(5) manpage says it can inherit the serial port speed from the previous boot stage (specifically boot2). This means that one can simply do -S115200 in /boot.config and achieve a higher port speed, without rebuilding bootblocks and without rebuilding the kernel. The present version of the Handbook also mentions all of the above: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialconsole-setup.html Looks like I get to spend the weekend trying out new things. Thank you for indirectly pointing these out. Item #1 (requiring one to build their own installation disks) should still be discussed. I got some private mails over that item, and I need to read them in full; there's concerns with situations where there's other stuff attached to a serial port, such as a UPS (something I hadn't thought of). I'm left thinking it might just be best for an administrator to snag the FreeBSD ISOs and add a /boot.config there to address serial console-based installs. I'll have to try that, and submit some PRs for Handbook updates explaining how to do it... -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |