From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 9 07:00:54 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90E34106564A; Sun, 9 Aug 2009 07:00:54 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id 0FB648FC08; Sun, 9 Aug 2009 07:00:54 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1Ma2Oi-0000Ah-7g; Sun, 09 Aug 2009 10:00:52 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Alexander Motin In-reply-to: <4A7D8F72.8090905@FreeBSD.org> References: <1249741381.00149226.1249729205@10.7.7.3> <4A7D8D7A.5030303@mavhome.dp.ua> <4A7D8F72.8090905@FreeBSD.org> Comments: In-reply-to Alexander Motin message dated "Sat, 08 Aug 2009 17:45:06 +0300." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 09 Aug 2009 10:00:52 +0300 From: Danny Braniss Message-ID: Cc: freebsd-scsi@freebsd.org, freebsd-current@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: request test drivers for iscsi_initiator 2.2.3 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Aug 2009 07:00:55 -0000 > Alexander Motin wrote: > > Danny Braniss wrote: > >> wups, forgot a small little detail: > >> ftp://ftp.cs.huji.ac.il/users/danny/freebsd/iscsi-2.2.3.tar.gz > > > > Is there reason why > > cpi->transport = XPORT_ISCSI; > > covered by > > #if defined(KNOB_VALID_ADDRESS) > > ? > I needed something to differentiate between the new CAM changes and the old (in <= 7.2), so if you have a better knob ... > Sorry, wrong question. But those who will test on CURRENT should take > care about it. why? it compiles - and works - ok under 8.0, at least till the last svn update :-) cheers, danny From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 10 11:59:02 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 303301065675 for ; Mon, 10 Aug 2009 11:59:02 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id DBE5D8FC2B for ; Mon, 10 Aug 2009 11:59:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id DEF80C07A for ; Mon, 10 Aug 2009 14:39:35 +0300 (EEST) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 24161-06 for ; Mon, 10 Aug 2009 14:39:35 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id E49C0C045 for ; Mon, 10 Aug 2009 14:39:34 +0300 (EEST) Message-ID: <4A8006F3.5020800@bulinfo.net> Date: Mon, 10 Aug 2009 14:39:31 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.19 (X11/20090225) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Subject: Help with device drivers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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 Aug 2009 11:59:02 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi All, Looking at sys/dev/usb/misc/ufm.c ... static int ufm_open(struct usb_fifo *dev, int fflags) { if ((fflags & (FWRITE | FREAD)) != (FWRITE | FREAD)) { return (EACCES); } return (0); } ... and sys/dev/usb/storage/urio.c ... static int urio_open(struct usb_fifo *fifo, int fflags) { struct urio_softc *sc = usb_fifo_softc(fifo); if ((fflags & (FWRITE | FREAD)) != (FWRITE | FREAD)) { return (EACCES); } ... If I try to open the device from userland with: fd = open("/dev/xxx0", O_RDWR) it fails because open() tries to open the device for reading first and then for writing. Do I use the wrong function to open such devices? Best Regards -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFKgAbyxJBWvpalMpkRAt2ZAKCWfTWtaCu+1Xcf70Z9RM3+peZJ/ACgof4q ybg2Mu3tDnz6Jwc1MA/Zwzs= =Usso -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 10 14:27:33 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2A59106566C for ; Mon, 10 Aug 2009 14:27:33 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8068FC38 for ; Mon, 10 Aug 2009 14:27:32 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=hlIU1J3LQChSjWV/CGRL5g==:17 a=6I5d2MoRAAAA:8 a=vMRqgvaLNkSmAsaVmwIA:9 a=yfCDHKOdtT3hj6lYpNUrFTIvMBAA:4 Received: from [193.217.167.6] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1285097494; Mon, 10 Aug 2009 15:27:30 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Mon, 10 Aug 2009 15:27:31 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <4A8006F3.5020800@bulinfo.net> In-Reply-To: <4A8006F3.5020800@bulinfo.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908101527.32952.hselasky@c2i.net> Cc: Krassimir Slavchev Subject: Re: Help with device drivers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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 Aug 2009 14:27:34 -0000 On Monday 10 August 2009 13:39:31 Krassimir Slavchev wrote: > If I try to open the device from userland with: > fd = open("/dev/xxx0", O_RDWR) it fails because open() tries to open the > device for reading first and then for writing. There is a bug in the code. If you open using read+write flags, then the FIFO open routine is called two times. The RD+WR check should be moved to the ioctl routine. http://perforce.freebsd.org/chv.cgi?CH=167171 --HPS From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 10 19:17:34 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 780B7106566C for ; Mon, 10 Aug 2009 19:17:34 +0000 (UTC) (envelope-from prvs=1466d23fa6=brian@FreeBSD.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 399E58FC3F for ; Mon, 10 Aug 2009 19:17:33 +0000 (UTC) Received: from pd3ml1so-ssvc.prod.shaw.ca ([10.0.141.140]) by pd2mo1so-svcs.prod.shaw.ca with ESMTP; 10 Aug 2009 12:49:22 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=1 a=0zvlh2TQcw8A:10 a=MJPcHhXccCG8eBs0us8XwA==:17 a=MMwg4So0AAAA:8 a=6I5d2MoRAAAA:8 a=6hh7W_hZ7X0qDfwzBfMA:9 a=YCZjTytjJJJwVDdAdr45246NBtQA:4 a=WJ3hkfHDukgA:10 a=SV7veod9ZcQA:10 a=T4YOgqH00-KZFLD0MaUA:9 a=eMRDXprrR6sdrDxFPBONgDeBcXcA:4 Received: from unknown (HELO store.lan.Awfulhak.org) ([70.79.162.198]) by pd3ml1so-dmz.prod.shaw.ca with ESMTP; 10 Aug 2009 12:49:22 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id B25F8C433B5_A806BA9B; Mon, 10 Aug 2009 18:49:13 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id 6EB86C4611F_A806BA7F; Mon, 10 Aug 2009 18:49:11 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.3/8.14.3) with ESMTP id n7AInJMa015375; Mon, 10 Aug 2009 11:49:19 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Mon, 10 Aug 2009 11:49:13 -0700 From: Brian Somers To: "Peter Steele" Message-ID: <20090810114913.74c0cb42@dev.lan.Awfulhak.org> In-Reply-To: References: <4A7C9738.10103@elischer.org> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.5; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/_tEAZ/udC5v5/KH_LLlC66F"; protocol="application/pgp-signature" Cc: freebsd-hackers@FreeBSD.org Subject: Re: How to signal a time zone change? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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 Aug 2009 19:17:34 -0000 --Sig_/_tEAZ/udC5v5/KH_LLlC66F Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 7 Aug 2009 15:08:16 -0700 "Peter Steele" wrote: > >What's the value of the TZ environment variable for the C apps? You may > need to have them read the new value from somewhere, and then rerun > tzset(). >=20 > The default value of the TZ environment variable is null. I just tried > passing the explicitly time zone value to the C app and setting TZ to > that value and that seemed to work. I would think that that I should be > able to retrieve that value from /etc/localtime as the docs imply. Guess > not. If I have to pass the time zone to the C app, then I guess that's > what I'll do... This doesn't work because of two bugs in localtime.c. The first is what you're hitting where tzset() calls tzset_basic() which calls tzsetwall_basi= c() which says: if (lcl_is_set < 0) { if (!rdlocked) _RWLOCK_UNLOCK(&lcl_rwlock); return; } If you were to have your own TZ setting and wanted to modify the file referred to by that, you'd bump into this bug in tzset_basic(): if (lcl_is_set > 0 && strcmp(lcl_TZname, name) =3D=3D 0) { if (!rdlocked) _RWLOCK_UNLOCK(&lcl_rwlock); return; } Roughly translated, localtime.c goes out of its way to never re-read the same zone file twice in a row. This is just a mistake. As you discovered, altering TZ before calling tzset() is the best way to make it work right now. If you really want to ensure that you're reading /etc/localtime, this bit of hackery works too: putenv("TZ=3D/dev/null"); tzset(); unsetenv("TZ"); tzset(); If you raise a PR and let me know the number, I'd be happy to fix this. --=20 Brian Somers Don't _EVER_ lose your sense of humour ! --Sig_/_tEAZ/udC5v5/KH_LLlC66F Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iQCVAwUBSoBrrg7tvOdmanQhAQIE+wQAiGkxjzzRGYzo1pB/ftgD9OpBbT8voiyH C3Ptle76G9Q9Rh9GuZnLR8ctANC5huc9xSKitPz62xvhwol1Zhn2Pd8DjKyrVtGr 2oZKN0zy0L/zPcSfBAJDcyvQCAPjDjIqR0EMqQ0u0fgjdtbiGBbuiIfE5LiT70/n IyMZijoqXWI= =+aSb -----END PGP SIGNATURE----- --Sig_/_tEAZ/udC5v5/KH_LLlC66F-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 11 01:36:17 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99E961065674 for ; Tue, 11 Aug 2009 01:36:17 +0000 (UTC) (envelope-from michelle_li_001@yahoo.com) Received: from web65411.mail.ac4.yahoo.com (web65411.mail.ac4.yahoo.com [76.13.9.31]) by mx1.freebsd.org (Postfix) with SMTP id 4AF6A8FC3D for ; Tue, 11 Aug 2009 01:36:17 +0000 (UTC) Received: (qmail 91905 invoked by uid 60001); 11 Aug 2009 01:09:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1249952975; bh=j2jUra2rf9yH8cH/VuOC8KKTuH7dh8gO3Dd4HljkxCk=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=dXP66IyrbWmrv631r6IpFJxHhkIPEzg3BQdO+kJbmaQDdj5VacdUzJoIcuXUWR+z9thjWC5dzCfz7JYW8vImIacEIfvooRNiaAnwiOp5qQUDu4foa4ZN/CnRnxDorxq9sOQud4S3Fj46xZtc3tDBl9roTTRmJ2zznOSTIxvoxNs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=hRv9TtExtJcHT9le10pdL66kg5Act6q3Oh7msK1scaH532JYmOiuLriBQjTw4SFXj2Dzx9C8hp3nJUYJegTRUUIZ3cHzGh/t0m0wg6IDaVt1GFmhA1dtrceqWksW+sQzsZHXYeXRIUYKeRQwEBShF/yGeCk1vk5jjGs3kyj2xHs=; Message-ID: <884424.91640.qm@web65411.mail.ac4.yahoo.com> X-YMail-OSG: e9ORKQMVM1lngaMSS3mz5DuLaLQ9vonlTpd1qPwOd6ZQiXBDzBZxNU8IhKCVIOHuRej9h.Z9dBA37q39O_01qltJ344n8T29pKcHZeR1iKyWVbycTQmxqTYt6lRQoa3poBoieluWXui9NQ81kRUWb9aqVWiTIqieF6LtYrAznQ7tmZfWqx.17yTGu..3lVAU0FH1XpCdJg_LwdkT._4OoysfwgQsQO0WBSFncN7R8cn9t3MqX.bb6_2HjyyOFmiFMC1RURDbz1ts.cXzdJEI4vyUGi99zaTr2aXI4_BDUohXu3OV31SSxQl_wmib Received: from [68.227.227.197] by web65411.mail.ac4.yahoo.com via HTTP; Mon, 10 Aug 2009 18:09:35 PDT X-Mailer: YahooMailClassic/6.1.2 YahooMailWebService/0.7.338.1 Date: Mon, 10 Aug 2009 18:09:35 -0700 (PDT) From: Michelle Li To: freebsd-hackers@freebsd.org In-Reply-To: <20090810120020.1A75610656BC@hub.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: device drivers (Krassimir Slavchev) REPLY fd = open("/dev/xxx0", O_RDWR) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Aug 2009 01:36:18 -0000 Hello Krassimir~ open() fails with [ENXIO]...or other? Please advise~ Regards m_li --- On Mon, 8/10/09, freebsd-hackers-request@freebsd.org wrote: From: freebsd-hackers-request@freebsd.org Subject: freebsd-hackers Digest, Vol 333, Issue 1 To: freebsd-hackers@freebsd.org Date: Monday, August 10, 2009, 8:00 AM Send freebsd-hackers mailing list submissions to =A0=A0=A0 freebsd-hackers@freebsd.org To subscribe or unsubscribe via the World Wide Web, visit =A0=A0=A0 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers or, via email, send a message with subject or body 'help' to =A0=A0=A0 freebsd-hackers-request@freebsd.org You can reach the person managing the list at =A0=A0=A0 freebsd-hackers-owner@freebsd.org When replying, please edit your Subject line so it is more specific than "Re: Contents of freebsd-hackers digest..." Today's Topics: =A0=A0=A01. Help with device drivers (Krassimir Slavchev) ---------------------------------------------------------------------- Message: 1 Date: Mon, 10 Aug 2009 14:39:31 +0300 From: Krassimir Slavchev Subject: Help with device drivers To: freebsd-hackers@freebsd.org Message-ID: <4A8006F3.5020800@bulinfo.net> Content-Type: text/plain; charset=3DISO-8859-1 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi All, Looking at sys/dev/usb/misc/ufm.c ... static int ufm_open(struct usb_fifo *dev, int fflags) { =A0 =A0 =A0 =A0 if ((fflags & (FWRITE | FREAD)) !=3D (FWRITE | FREAD)) { =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return (EACCES); =A0 =A0 =A0 =A0 } =A0 =A0 =A0 =A0 return (0); } ... and sys/dev/usb/storage/urio.c ... static int urio_open(struct usb_fifo *fifo, int fflags) { =A0 =A0 =A0 =A0 struct urio_softc *sc =3D usb_fifo_softc(fifo); =A0 =A0 =A0 =A0 if ((fflags & (FWRITE | FREAD)) !=3D (FWRITE | FREAD)) { =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return (EACCES); =A0 =A0 =A0 =A0 } ... If I try to open the device from userland with: fd =3D open("/dev/xxx0", O_RDWR) it fails because open() tries to open the device for reading first and then for writing. Do I use the wrong function to open such devices? Best Regards -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFKgAbyxJBWvpalMpkRAt2ZAKCWfTWtaCu+1Xcf70Z9RM3+peZJ/ACgof4q ybg2Mu3tDnz6Jwc1MA/Zwzs=3D =3DUsso -----END PGP SIGNATURE----- ------------------------------ _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" End of freebsd-hackers Digest, Vol 333, Issue 1 *********************************************** =0A=0A=0A From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 11 04:25:00 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A44561065670 for ; Tue, 11 Aug 2009 04:25:00 +0000 (UTC) (envelope-from matthew@digitalstratum.com) Received: from mail-yx0-f181.google.com (mail-yx0-f181.google.com [209.85.210.181]) by mx1.freebsd.org (Postfix) with ESMTP id 694998FC2B for ; Tue, 11 Aug 2009 04:25:00 +0000 (UTC) Received: by yxe11 with SMTP id 11so4725007yxe.3 for ; Mon, 10 Aug 2009 21:24:59 -0700 (PDT) Received: by 10.100.240.15 with SMTP id n15mr4580931anh.63.1249962924905; Mon, 10 Aug 2009 20:55:24 -0700 (PDT) Received: from ?10.0.81.13? (adsl-76-236-176-45.dsl.klmzmi.sbcglobal.net [76.236.176.45]) by mx.google.com with ESMTPS id d29sm1516907and.18.2009.08.10.20.55.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 10 Aug 2009 20:55:24 -0700 (PDT) Message-ID: <4A80EBA6.40908@digitalstratum.com> Date: Mon, 10 Aug 2009 23:55:18 -0400 From: Matthew Hagerty Organization: Digital Stratum User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Tracing Wake on Lan problem? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: matthew@digitalstratum.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2009 04:25:00 -0000 Greetings, I'm trying to get the Wake on Lan feature working on a 7.2-release box. I have two Intel NIC's, a Pro/100 and Pro/1000 (82541PI). The Pro/100 worked great right from the start using the generic kernel and was detected by the fxp driver. Using the wol (from ports) on another box fired the WoL box right up. However, I would like to use the gigabit card in the WoL box, which is detected by the em driver, and according to the WoL wiki and some posts to hackers a few months ago, the em driver does not have WoL support yet. I went digging and actually found FreeBSD specific drivers (in source code form) on Intel's site (would never have guessed that in a million years) and the code provided builds an if_em kernel load module. So I built a custom kernel removing all network card drivers. Then I built and installed the Intel provided if_em module. The system starts fine and configures the NIC, but I still do not have WoL ability. What can I do to track down where the problem might be? Here are some details: # dmesg . . . em0: port 0x14c0-0x14ff mem 0x40200000-0x4021ffff,0x40300000-0x4031ffff irq 18 at device 9.0 on pci2 . . . 6.9.12 is the version in the source code provided by Intel. The em driver that comes with 7.2R is 6.9.6 I believe. Device 0x107c matches my NIC in the e1000_hw.h file: #define E1000_DEV_ID_82541GI_LF 0x107C # sysctl -a | grep em.0 dev.em.0.%desc: Intel(R) PRO/1000 Network Connection 6.9.12 dev.em.0.%driver: em dev.em.0.%location: slot=9 function=0 dev.em.0.%pnpinfo: vendor=0x8086 device=0x107c subvendor=0x8086 subdevice=0x1376 class=0x020000 dev.em.0.%parent: pci2 dev.em.0.debug: -1 dev.em.0.stats: -1 dev.em.0.rx_int_delay: 0 dev.em.0.tx_int_delay: 66 dev.em.0.rx_abs_int_delay: 66 dev.em.0.tx_abs_int_delay: 66 dev.em.0.rx_processing_limit: 100 # ifconfig -m em0 em0: flags=8843 metric 0 mtu 1500 options=9b capabilities=19b ether 00:1b:21:3a:32:ed inet 10.0.81.6 netmask 0xffffff00 broadcast 10.0.81.255 media: Ethernet autoselect (1000baseTX ) status: active supported media: media autoselect media 1000baseTX media 1000baseTX mediaopt full-duplex media 100baseTX mediaopt full-duplex media 100baseTX media 10baseT/UTP mediaopt full-duplex media 10baseT/UTP The card does not report WoL in its capabilities, however the datasheet (http://download.intel.com/design/network/datashts/318138.pdf) indicates WoL support. # kldstat Id Refs Address Size Name 1 8 0xc0400000 536ef8 kernel 2 1 0xc0937000 31eec if_em.ko 3 1 0xc0969000 6a45c acpi.ko 4 1 0xc238b000 3000 daemon_saver.ko # kldstat -v . . . 2 1 0xc0937000 31eec if_em.ko Contains modules: Id Name 1 pci/em . . . The if_em.c code from Intel also have functions for dealing with WoL: /* Management and WOL Support */ static void em_init_manageability(struct adapter *); static void em_release_manageability(struct adapter *); static void em_get_hw_control(struct adapter *); static void em_release_hw_control(struct adapter *); static void em_enable_wakeup(device_t); I've been reading through the code to see if there is any reason why my specific chipset would be ignored or have special #ifdefs, etc., but I don't see anything. Only the multi-port fiber cards seem to have special code (only port A supports the WoL it seems). I'm pretty good with C but have no device driver programming experience (but I would like to learn some). Any tips or pointers on how I can proceeded to solving this would be greatly appreciated. Also, is there any reason Intel's source is not provided with FreeBSD, since it seems they have taken the time to write the driver? Probably a copyright thing right? Either way, I'd like to get this working if possible. Thanks, Matthew From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 11 06:06:31 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9290210656CA for ; Tue, 11 Aug 2009 06:06:31 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id 48CC18FC16 for ; Tue, 11 Aug 2009 06:06:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id 01893C10C; Tue, 11 Aug 2009 09:06:28 +0300 (EEST) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 60782-04; Tue, 11 Aug 2009 09:06:28 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 1A1B6BB47; Tue, 11 Aug 2009 09:06:28 +0300 (EEST) Message-ID: <4A810A62.1070408@bulinfo.net> Date: Tue, 11 Aug 2009 09:06:26 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.19 (X11/20090225) MIME-Version: 1.0 To: Hans Petter Selasky References: <4A8006F3.5020800@bulinfo.net> <200908101527.32952.hselasky@c2i.net> In-Reply-To: <200908101527.32952.hselasky@c2i.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-hackers@freebsd.org Subject: Re: Help with device drivers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Aug 2009 06:06:32 -0000 Hans Petter Selasky wrote: > On Monday 10 August 2009 13:39:31 Krassimir Slavchev wrote: >> If I try to open the device from userland with: >> fd = open("/dev/xxx0", O_RDWR) it fails because open() tries to open the >> device for reading first and then for writing. > > There is a bug in the code. If you open using read+write flags, then the FIFO > open routine is called two times. The RD+WR check should be moved to the ioctl > routine. > > http://perforce.freebsd.org/chv.cgi?CH=167171 Thanks! It seems that sys/dev/usb/storage/urio.c should be fixed too? Best Regards > > --HPS > > _______________________________________________ > 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 Tue Aug 11 07:58:37 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F3631065675 for ; Tue, 11 Aug 2009 07:58:37 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.swipnet.se [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id 26CD18FC31 for ; Tue, 11 Aug 2009 07:58:36 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=hlIU1J3LQChSjWV/CGRL5g==:17 a=6I5d2MoRAAAA:8 a=tuOmyfi0SiQLfp7mNtIA:9 a=gNV9LsW15rBxnngIxHoA:7 a=U4xBdnc4W93rB-pnAuyZxJ6JOTMA:4 Received: from [193.217.167.6] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 551756136; Tue, 11 Aug 2009 08:58:34 +0200 From: Hans Petter Selasky To: Krassimir Slavchev Date: Tue, 11 Aug 2009 08:58:41 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <4A8006F3.5020800@bulinfo.net> <200908101527.32952.hselasky@c2i.net> <4A810A62.1070408@bulinfo.net> In-Reply-To: <4A810A62.1070408@bulinfo.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908110858.41835.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Help with device drivers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Aug 2009 07:58:37 -0000 On Tuesday 11 August 2009 08:06:26 Krassimir Slavchev wrote: > Hans Petter Selasky wrote: > > On Monday 10 August 2009 13:39:31 Krassimir Slavchev wrote: > >> If I try to open the device from userland with: > >> fd = open("/dev/xxx0", O_RDWR) it fails because open() tries to open the > >> device for reading first and then for writing. > > > > There is a bug in the code. If you open using read+write flags, then the > > FIFO open routine is called two times. The RD+WR check should be moved to > > the ioctl routine. > > > > http://perforce.freebsd.org/chv.cgi?CH=167171 > > Thanks! > > It seems that sys/dev/usb/storage/urio.c should be fixed too? > > Best Regards > > > --HPS You are right! http://perforce.freebsd.org/chv.cgi?CH=167199 --HPS From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 11 08:37:23 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A1051065670 for ; Tue, 11 Aug 2009 08:37:23 +0000 (UTC) (envelope-from rb@gid.co.uk) Received: from mx0.gid.co.uk (mx0.gid.co.uk [194.32.164.250]) by mx1.freebsd.org (Postfix) with ESMTP id E56128FC40 for ; Tue, 11 Aug 2009 08:37:22 +0000 (UTC) Received: from gidgate.gid.co.uk (80-46-130-69.static.dsl.as9105.com [80.46.130.69]) by mx0.gid.co.uk (8.14.2/8.14.2) with ESMTP id n7B8bKZN030905; Tue, 11 Aug 2009 09:37:20 +0100 (BST) (envelope-from rb@gid.co.uk) Received: from host46.msm.che.vodafone ([212.183.134.211]) by gidgate.gid.co.uk (8.13.8/8.13.8) with ESMTP id n7B8bAS1003802; Tue, 11 Aug 2009 09:37:12 +0100 (BST) (envelope-from rb@gid.co.uk) Message-Id: <06A3B5AF-D3DA-4446-84EF-93314B2EA636@gid.co.uk> From: Bob Bishop To: matthew@digitalstratum.com In-Reply-To: <4A80EBA6.40908@digitalstratum.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Tue, 11 Aug 2009 09:37:04 +0100 References: <4A80EBA6.40908@digitalstratum.com> X-Mailer: Apple Mail (2.936) Cc: freebsd-hackers@freebsd.org Subject: Re: Tracing Wake on Lan problem? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Aug 2009 08:37:23 -0000 Hi, On 11 Aug 2009, at 04:55, Matthew Hagerty wrote: > I'm trying to get the Wake on Lan feature working on a 7.2-release > box. [etc] You may need to turn WoL on in the BIOS, have a look in the same place as the LAN boot settings. -- Bob Bishop rb@gid.co.uk From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 11 15:15:37 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55B141065679 for ; Tue, 11 Aug 2009 15:15:37 +0000 (UTC) (envelope-from matthew@digitalstratum.com) Received: from mail-pz0-f174.google.com (mail-pz0-f174.google.com [209.85.222.174]) by mx1.freebsd.org (Postfix) with ESMTP id 340B18FC21 for ; Tue, 11 Aug 2009 15:15:36 +0000 (UTC) Received: by pzk4 with SMTP id 4so516103pzk.7 for ; Tue, 11 Aug 2009 08:15:36 -0700 (PDT) Received: by 10.115.18.10 with SMTP id v10mr8262408wai.170.1250003733129; Tue, 11 Aug 2009 08:15:33 -0700 (PDT) Received: from ?10.0.81.14? (adsl-76-236-176-45.dsl.klmzmi.sbcglobal.net [76.236.176.45]) by mx.google.com with ESMTPS id d20sm10383833waa.47.2009.08.11.08.15.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 Aug 2009 08:15:31 -0700 (PDT) Message-ID: <4A818B0E.7090609@digitalstratum.com> Date: Tue, 11 Aug 2009 11:15:26 -0400 From: Matthew Hagerty User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4A80EBA6.40908@digitalstratum.com> <06A3B5AF-D3DA-4446-84EF-93314B2EA636@gid.co.uk> In-Reply-To: <06A3B5AF-D3DA-4446-84EF-93314B2EA636@gid.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Tracing Wake on Lan problem? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Aug 2009 15:15:37 -0000 Bob Bishop wrote: > Hi, > > On 11 Aug 2009, at 04:55, Matthew Hagerty wrote: > >> I'm trying to get the Wake on Lan feature working on a 7.2-release >> box. [etc] > > You may need to turn WoL on in the BIOS, have a look in the same place > as the LAN boot settings. > > -- > Bob Bishop > rb@gid.co.uk I guess I assumed that, since the WoL works with my Intel Pro/100 NIC, that the APCI and wake-up settings in the BIOS were set correctly. It is only when I try the Pro/1000 that I'm having problems; and it seems to be a driver or config issue. Matthew From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 11 15:37:50 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 745101065670 for ; Tue, 11 Aug 2009 15:37:50 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from unsane.co.uk (unsane-pt.tunnel.tserv5.lon1.ipv6.he.net [IPv6:2001:470:1f08:110::2]) by mx1.freebsd.org (Postfix) with ESMTP id D68868FC4A for ; Tue, 11 Aug 2009 15:37:49 +0000 (UTC) Received: from vhoffman.lon.namesco.net (150.117-84-212.staticip.namesco.net [212.84.117.150]) (authenticated bits=0) by unsane.co.uk (8.14.3/8.14.3) with ESMTP id n7BFeb26038341 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Aug 2009 16:40:38 +0100 (BST) (envelope-from vince@unsane.co.uk) Message-ID: <4A819049.6030806@unsane.co.uk> Date: Tue, 11 Aug 2009 16:37:45 +0100 From: Vincent Hoffman User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Matthew Hagerty References: <4A80EBA6.40908@digitalstratum.com> <06A3B5AF-D3DA-4446-84EF-93314B2EA636@gid.co.uk> <4A818B0E.7090609@digitalstratum.com> In-Reply-To: <4A818B0E.7090609@digitalstratum.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Tracing Wake on Lan problem? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Aug 2009 15:37:50 -0000 Matthew Hagerty wrote: > Bob Bishop wrote: >> Hi, >> >> On 11 Aug 2009, at 04:55, Matthew Hagerty wrote: >> >>> I'm trying to get the Wake on Lan feature working on a 7.2-release >>> box. [etc] >> >> You may need to turn WoL on in the BIOS, have a look in the same >> place as the LAN boot settings. >> >> -- >> Bob Bishop >> rb@gid.co.uk > I guess I assumed that, since the WoL works with my Intel Pro/100 NIC, > that the APCI and wake-up settings in the BIOS were set correctly. It > is only when I try the Pro/1000 that I'm having problems; and it seems > to be a driver or config issue. > > Matthew I think you are out of luck as yet. according to http://wiki.freebsd.org/WakeOnLan grep -l IFCAP_WOL /usr/src/sys/dev/*/*.c should get a list of drivers that support WOL. 16:28:19 <~>) [jhary@crab] 0 $ grep -l IFCAP_WOL /usr/src/sys/dev/*/*.c /usr/src/sys/dev/ae/if_ae.c /usr/src/sys/dev/age/if_age.c /usr/src/sys/dev/alc/if_alc.c /usr/src/sys/dev/ale/if_ale.c /usr/src/sys/dev/fxp/if_fxp.c /usr/src/sys/dev/jme/if_jme.c /usr/src/sys/dev/nge/if_nge.c /usr/src/sys/dev/re/if_re.c /usr/src/sys/dev/stge/if_stge.c /usr/src/sys/dev/txp/if_txp.c /usr/src/sys/dev/vr/if_vr.c (16:28:21 <~>) [jhary@crab] 0 $ uname -r 7.2-STABLE The Pro/1000 driver is if_em (or if_igb) So i think you are out of luck on 7.x Vince > _______________________________________________ > 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 Tue Aug 11 16:03:03 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C13521065670 for ; Tue, 11 Aug 2009 16:03:03 +0000 (UTC) (envelope-from matthew@digitalstratum.com) Received: from mail-pz0-f174.google.com (mail-pz0-f174.google.com [209.85.222.174]) by mx1.freebsd.org (Postfix) with ESMTP id 93D2F8FC45 for ; Tue, 11 Aug 2009 16:03:03 +0000 (UTC) Received: by pzk4 with SMTP id 4so540672pzk.7 for ; Tue, 11 Aug 2009 09:03:02 -0700 (PDT) Received: by 10.114.57.19 with SMTP id f19mr8396209waa.17.1250006582809; Tue, 11 Aug 2009 09:03:02 -0700 (PDT) Received: from ?10.0.81.14? (adsl-76-236-176-45.dsl.klmzmi.sbcglobal.net [76.236.176.45]) by mx.google.com with ESMTPS id m17sm10516603waf.3.2009.08.11.09.03.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 Aug 2009 09:03:02 -0700 (PDT) Message-ID: <4A819634.5050503@digitalstratum.com> Date: Tue, 11 Aug 2009 12:03:00 -0400 From: Matthew Hagerty User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4A80EBA6.40908@digitalstratum.com> <06A3B5AF-D3DA-4446-84EF-93314B2EA636@gid.co.uk> <4A818B0E.7090609@digitalstratum.com> <4A819049.6030806@unsane.co.uk> In-Reply-To: <4A819049.6030806@unsane.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Tracing Wake on Lan problem? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Aug 2009 16:03:04 -0000 Vincent Hoffman wrote: > Matthew Hagerty wrote: > >> Bob Bishop wrote: >> >>> Hi, >>> >>> On 11 Aug 2009, at 04:55, Matthew Hagerty wrote: >>> >>> >>>> I'm trying to get the Wake on Lan feature working on a 7.2-release >>>> box. [etc] >>>> >>> You may need to turn WoL on in the BIOS, have a look in the same >>> place as the LAN boot settings. >>> >>> -- >>> Bob Bishop >>> rb@gid.co.uk >>> >> I guess I assumed that, since the WoL works with my Intel Pro/100 NIC, >> that the APCI and wake-up settings in the BIOS were set correctly. It >> is only when I try the Pro/1000 that I'm having problems; and it seems >> to be a driver or config issue. >> >> Matthew >> > > > I think you are out of luck as yet. according to > http://wiki.freebsd.org/WakeOnLan > grep -l IFCAP_WOL /usr/src/sys/dev/*/*.c > should get a list of drivers that support WOL. > > 16:28:19 <~>) > [jhary@crab] 0 $ grep -l IFCAP_WOL /usr/src/sys/dev/*/*.c > /usr/src/sys/dev/ae/if_ae.c > /usr/src/sys/dev/age/if_age.c > /usr/src/sys/dev/alc/if_alc.c > /usr/src/sys/dev/ale/if_ale.c > /usr/src/sys/dev/fxp/if_fxp.c > /usr/src/sys/dev/jme/if_jme.c > /usr/src/sys/dev/nge/if_nge.c > /usr/src/sys/dev/re/if_re.c > /usr/src/sys/dev/stge/if_stge.c > /usr/src/sys/dev/txp/if_txp.c > /usr/src/sys/dev/vr/if_vr.c > (16:28:21 <~>) > [jhary@crab] 0 $ uname -r > 7.2-STABLE > > The Pro/1000 driver is if_em (or if_igb) So i think you are out of luck > on 7.x > > > Vince > Correct, the stock if_em.c code that comes with 7.2R does not have the WoL support. However, I'm using the the source code driver from Intel that does seem to support WoL (see my original post for details). The Intel provided em driver compiles into a kernel load module, and as far as I can tell it is being loaded and working just fine; other than the WoL part. I was hoping to get some tips on how I might trace through the driver, add some debug info, run some elite commands that only kernel hackers know about, etc., to determine why my NIC is not reporting support for WoL even though the Intel em driver supports it. Matthew From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 11 16:17:58 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDE881065686 for ; Tue, 11 Aug 2009 16:17:58 +0000 (UTC) (envelope-from matthew@digitalstratum.com) Received: from mail-pz0-f174.google.com (mail-pz0-f174.google.com [209.85.222.174]) by mx1.freebsd.org (Postfix) with ESMTP id AA2E28FC5E for ; Tue, 11 Aug 2009 16:17:58 +0000 (UTC) Received: by pzk4 with SMTP id 4so548195pzk.7 for ; Tue, 11 Aug 2009 09:17:58 -0700 (PDT) Received: by 10.114.38.7 with SMTP id l7mr5684042wal.224.1250007476353; Tue, 11 Aug 2009 09:17:56 -0700 (PDT) Received: from ?10.0.81.14? (adsl-76-236-176-45.dsl.klmzmi.sbcglobal.net [76.236.176.45]) by mx.google.com with ESMTPS id f20sm10494470waf.17.2009.08.11.09.17.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 Aug 2009 09:17:55 -0700 (PDT) Message-ID: <4A8199B2.30403@digitalstratum.com> Date: Tue, 11 Aug 2009 12:17:54 -0400 From: Matthew Hagerty User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4A80EBA6.40908@digitalstratum.com> <06A3B5AF-D3DA-4446-84EF-93314B2EA636@gid.co.uk> <4A818B0E.7090609@digitalstratum.com> <4A819049.6030806@unsane.co.uk> <58c737d70908110858l3548e91cnddb5fa1b85a29533@mail.gmail.com> In-Reply-To: <58c737d70908110858l3548e91cnddb5fa1b85a29533@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Tracing Wake on Lan problem? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Aug 2009 16:17:59 -0000 Chris Ruiz wrote: > On Tue, Aug 11, 2009 at 10:37 AM, Vincent Hoffman wrote: > >> Matthew Hagerty wrote: >> >>> Bob Bishop wrote: >>> >>>> Hi, >>>> >>>> On 11 Aug 2009, at 04:55, Matthew Hagerty wrote: >>>> >>>> >>>>> I'm trying to get the Wake on Lan feature working on a 7.2-release >>>>> box. [etc] >>>>> >>>> You may need to turn WoL on in the BIOS, have a look in the same >>>> place as the LAN boot settings. >>>> >>>> -- >>>> Bob Bishop >>>> rb@gid.co.uk >>>> >>> I guess I assumed that, since the WoL works with my Intel Pro/100 NIC, >>> that the APCI and wake-up settings in the BIOS were set correctly. It >>> is only when I try the Pro/1000 that I'm having problems; and it seems >>> to be a driver or config issue. >>> >>> Matthew >>> >> I think you are out of luck as yet. according to >> http://wiki.freebsd.org/WakeOnLan >> grep -l IFCAP_WOL /usr/src/sys/dev/*/*.c >> should get a list of drivers that support WOL. >> >> 16:28:19 <~>) >> [jhary@crab] 0 $ grep -l IFCAP_WOL /usr/src/sys/dev/*/*.c >> /usr/src/sys/dev/ae/if_ae.c >> /usr/src/sys/dev/age/if_age.c >> /usr/src/sys/dev/alc/if_alc.c >> /usr/src/sys/dev/ale/if_ale.c >> /usr/src/sys/dev/fxp/if_fxp.c >> /usr/src/sys/dev/jme/if_jme.c >> /usr/src/sys/dev/nge/if_nge.c >> /usr/src/sys/dev/re/if_re.c >> /usr/src/sys/dev/stge/if_stge.c >> /usr/src/sys/dev/txp/if_txp.c >> /usr/src/sys/dev/vr/if_vr.c >> (16:28:21 <~>) >> [jhary@crab] 0 $ uname -r >> 7.2-STABLE >> >> The Pro/1000 driver is if_em (or if_igb) So i think you are out of luck >> on 7.x >> > > Vince is correct, the e1000 (if_em/igb) driver does not support WOL, yet. > > Chris > Yes, but I'm trying to use Intel's driver at this point (since the stock 7.2R em driver, as stated, does not support WoL yet): http://downloadcenter.intel.com/filter_results.aspx?strTypes=all&ProductID=1938&OSFullName=FreeBSD*&lang=eng&strOSs=52&submit=Go! And it does appear to offer support for WoL. They (Intel) have functions in their if_em.c source file that sets up the WoL. However, there is no IFCAP_WOL define in Intel's code, so maybe it does not interface with ifconfig correctly at this point? I don't know. I was hoping to get some pointers on where to look or how to tell. Also, I'm not opposed to adding the WoL support - I'm not too bad in C - I've just never written a FreeBSD device driver and the excellent post by Stefan Sperling (referenced from the WoL wiki) seems to be too far out of date. The wiki itself states: "Note that the obsolete ioctl-based configuration approach is discussed there, but ifcaps should be used instead." So, not knowing anything about either ioctl-based or ifcaps config, I can't find any resources on how to get started in the right direction (hence my post to hackers). Also, if Intel's driver code works, it seems to me that it makes more sense to use their code for em devices, no? Is there a copyright problem with that? Matthew From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 11 16:23:57 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A4391065670 for ; Tue, 11 Aug 2009 16:23:57 +0000 (UTC) (envelope-from yr.retarded@gmail.com) Received: from mail-ew0-f206.google.com (mail-ew0-f206.google.com [209.85.219.206]) by mx1.freebsd.org (Postfix) with ESMTP id B4B5C8FC3D for ; Tue, 11 Aug 2009 16:23:56 +0000 (UTC) Received: by ewy2 with SMTP id 2so3835789ewy.43 for ; Tue, 11 Aug 2009 09:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5Lky1spqE9yjrlDIS8/KguenFgPANQVLK+KJ4d4c5Uc=; b=SQooDZMkpCtr++Q4EohcK1kcKmXacyjsxOrN3IJS1pRIU1AUx4b4lNC4gU+lSFS6LP yLW7VTvIfL77VRFMb8sWVgIvr8+yGnySevtA2mED3FIDWD0XFEiimHGewDZHhif5pDEc oH2IGmZnycnLPysnSKh+WKDLlkq93rDVgYHnc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Mmak1sW9S2vAcFCKmSq3eOJKhbDqBgJWFVI+lGbI2Iweq3LwFf/Svhs1LOqQbkrgKO O30yMHq5aR4iDSgifi2p5C+6lw07NxOAUyVMeKJYC+FNseFdKXC3H32aulDokO12vSoe 9qdOBUgetyC8qWrrGWVvm9I9L8sVbJ+pTABO4= MIME-Version: 1.0 Received: by 10.210.43.10 with SMTP id q10mr1091211ebq.97.1250006285184; Tue, 11 Aug 2009 08:58:05 -0700 (PDT) In-Reply-To: <4A819049.6030806@unsane.co.uk> References: <4A80EBA6.40908@digitalstratum.com> <06A3B5AF-D3DA-4446-84EF-93314B2EA636@gid.co.uk> <4A818B0E.7090609@digitalstratum.com> <4A819049.6030806@unsane.co.uk> Date: Tue, 11 Aug 2009 10:58:05 -0500 Message-ID: <58c737d70908110858l3548e91cnddb5fa1b85a29533@mail.gmail.com> From: Chris Ruiz To: Vincent Hoffman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Matthew Hagerty , freebsd-hackers@freebsd.org Subject: Re: Tracing Wake on Lan problem? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 11 Aug 2009 16:23:57 -0000 On Tue, Aug 11, 2009 at 10:37 AM, Vincent Hoffman wrote= : > Matthew Hagerty wrote: >> Bob Bishop wrote: >>> Hi, >>> >>> On 11 Aug 2009, at 04:55, Matthew Hagerty wrote: >>> >>>> I'm trying to get the Wake on Lan feature working on a 7.2-release >>>> box. [etc] >>> >>> You may need to turn WoL on in the BIOS, have a look in the same >>> place as the LAN boot settings. >>> >>> -- >>> Bob Bishop >>> rb@gid.co.uk >> I guess I assumed that, since the WoL works with my Intel Pro/100 NIC, >> that the APCI and wake-up settings in the BIOS were set correctly. =A0It >> is only when I try the Pro/1000 that I'm having problems; and it seems >> to be a driver or config issue. >> >> Matthew > > > I think =A0you are out of luck as yet. according to > http://wiki.freebsd.org/WakeOnLan > grep -l IFCAP_WOL /usr/src/sys/dev/*/*.c > should get a list of drivers that support WOL. > > 16:28:19 <~>) > [jhary@crab] 0 $ grep -l IFCAP_WOL /usr/src/sys/dev/*/*.c > /usr/src/sys/dev/ae/if_ae.c > /usr/src/sys/dev/age/if_age.c > /usr/src/sys/dev/alc/if_alc.c > /usr/src/sys/dev/ale/if_ale.c > /usr/src/sys/dev/fxp/if_fxp.c > /usr/src/sys/dev/jme/if_jme.c > /usr/src/sys/dev/nge/if_nge.c > /usr/src/sys/dev/re/if_re.c > /usr/src/sys/dev/stge/if_stge.c > /usr/src/sys/dev/txp/if_txp.c > /usr/src/sys/dev/vr/if_vr.c > (16:28:21 <~>) > [jhary@crab] 0 $ uname -r > 7.2-STABLE > > The Pro/1000 driver is if_em (or if_igb) So i think you are out of luck > on 7.x Vince is correct, the e1000 (if_em/igb) driver does not support WOL, yet. Chris From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 12 10:13:23 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9067106566C for ; Wed, 12 Aug 2009 10:13:23 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from unsane.co.uk (unsane-pt.tunnel.tserv5.lon1.ipv6.he.net [IPv6:2001:470:1f08:110::2]) by mx1.freebsd.org (Postfix) with ESMTP id 346D68FC48 for ; Wed, 12 Aug 2009 10:13:22 +0000 (UTC) Received: from vhoffman.lon.namesco.net (150.117-84-212.staticip.namesco.net [212.84.117.150]) (authenticated bits=0) by unsane.co.uk (8.14.3/8.14.3) with ESMTP id n7CAG4aW053780 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Aug 2009 11:16:07 +0100 (BST) (envelope-from vince@unsane.co.uk) Message-ID: <4A8295BA.5030206@unsane.co.uk> Date: Wed, 12 Aug 2009 11:13:14 +0100 From: Vincent Hoffman User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Matthew Hagerty References: <4A80EBA6.40908@digitalstratum.com> <06A3B5AF-D3DA-4446-84EF-93314B2EA636@gid.co.uk> <4A818B0E.7090609@digitalstratum.com> <4A819049.6030806@unsane.co.uk> <58c737d70908110858l3548e91cnddb5fa1b85a29533@mail.gmail.com> <4A8199B2.30403@digitalstratum.com> In-Reply-To: <4A8199B2.30403@digitalstratum.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Tracing Wake on Lan problem? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 12 Aug 2009 10:13:24 -0000 Matthew Hagerty wrote: > >> > Yes, but I'm trying to use Intel's driver at this point (since the > stock 7.2R em driver, as stated, does not support WoL yet): > > http://downloadcenter.intel.com/filter_results.aspx?strTypes=all&ProductID=1938&OSFullName=FreeBSD*&lang=eng&strOSs=52&submit=Go! > > > And it does appear to offer support for WoL. They (Intel) have > functions in their if_em.c source file that sets up the WoL. However, > there is no IFCAP_WOL define in Intel's code, so maybe it does not > interface with ifconfig correctly at this point? I don't know. I was > hoping to get some pointers on where to look or how to tell. Also, > I'm not opposed to adding the WoL support - I'm not too bad in C - > I've just never written a FreeBSD device driver and the excellent post > by Stefan Sperling (referenced from the WoL wiki) seems to be too far > out of date. > > The wiki itself states: "Note that the obsolete ioctl-based > configuration approach is discussed there, but ifcaps should be used > instead." > > So, not knowing anything about either ioctl-based or ifcaps config, I > can't find any resources on how to get started in the right direction > (hence my post to hackers). > > Also, if Intel's driver code works, it seems to me that it makes more > sense to use their code for em devices, no? Is there a copyright > problem with that? Sorry I missed the first email or two and didnt realise you were trying the latest from the intel site. Intel (well an intel employee but as part of his day job from what I understand from his posts,) maintains the driver in the source tree. The last I remember him saying about wake on lan for em was http://lists.freebsd.org/pipermail/freebsd-current/2009-July/009461.html As to why FreeBSD isnt using the one currently on the intel site, not certain but it may just be a case of it needing updating/committing, as an email from the maintainer http://markmail.org/message/u4crubkss3354nlt indicates from a previous similar enquiry. hope that helps, Vince > > Matthew > > _______________________________________________ > 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 Aug 12 19:24:50 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37AC81065670; Wed, 12 Aug 2009 19:24:50 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-gx0-f217.google.com (mail-gx0-f217.google.com [209.85.217.217]) by mx1.freebsd.org (Postfix) with ESMTP id B16538FC15; Wed, 12 Aug 2009 19:24:49 +0000 (UTC) Received: by gxk17 with SMTP id 17so322175gxk.19 for ; Wed, 12 Aug 2009 12:24:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=Qv7os11J5GbP1xSXtsarQLB+bLT2JLXbfgeC5ojcYsA=; b=mMosrhcsbMwOmJK4rOhZLaFlgeSJqwaCP8WURG0tT8z0L4kRgdvvjwA208pNACeDJf eBPwwI4uQIbht11HOvmAIeh7NCebuESr83NeQVHKtNDXO49K19DxJtDuEC+/rY09z+oO GzunB4rtOEDq4eTNEwfJI7I3E2Gah9YmCZ9IU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=FVRXYa+6LnForVYP70RP05Q9Q/S0KZiXUmU55CSUo6PLrxwKp7a8pHL+UUkLx0LO/7 IF+QFZIi4hFZkR5gff/FaZwPPB73DpQ9+X8zJ4llYfDGF0kz2mgRggz/28pX+2k/HECY 8xDSmU+fYgPRagpAfN8IVoA52GPrGDUcLk4Jk= Received: by 10.90.100.20 with SMTP id x20mr172768agb.45.1250103858859; Wed, 12 Aug 2009 12:04:18 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 2sm3080846aga.58.2009.08.12.12.04.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 12 Aug 2009 12:04:17 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Wed, 12 Aug 2009 12:03:14 -0700 From: Pyun YongHyeon Date: Wed, 12 Aug 2009 12:03:14 -0700 To: Matthew Hagerty Message-ID: <20090812190314.GA55129@michelle.cdnetworks.com> References: <4A80EBA6.40908@digitalstratum.com> <06A3B5AF-D3DA-4446-84EF-93314B2EA636@gid.co.uk> <4A818B0E.7090609@digitalstratum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A818B0E.7090609@digitalstratum.com> User-Agent: Mutt/1.4.2.3i Cc: Jack F Vogel , freebsd-hackers@freebsd.org Subject: Re: Tracing Wake on Lan problem? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 19:24:50 -0000 On Tue, Aug 11, 2009 at 11:15:26AM -0400, Matthew Hagerty wrote: > Bob Bishop wrote: > >Hi, > > > >On 11 Aug 2009, at 04:55, Matthew Hagerty wrote: > > > >>I'm trying to get the Wake on Lan feature working on a 7.2-release > >>box. [etc] > > > >You may need to turn WoL on in the BIOS, have a look in the same place > >as the LAN boot settings. > > > >-- > >Bob Bishop > >rb@gid.co.uk > I guess I assumed that, since the WoL works with my Intel Pro/100 NIC, > that the APCI and wake-up settings in the BIOS were set correctly. It > is only when I try the Pro/1000 that I'm having problems; and it seems > to be a driver or config issue. > em(4) implemented WOL in its own way so it may work on some models. Last time I tried it on my T400 it didn't work. Quick reading the code shows a couple of required things are still missing in em(4). Probably Jack knows when it could be done.(CCed) From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 13 21:58:02 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E648E1065698 for ; Thu, 13 Aug 2009 21:58:02 +0000 (UTC) (envelope-from lgj@usenix.org) Received: from lonestar.usenix.org (lonestar.usenix.org [131.106.3.102]) by mx1.freebsd.org (Postfix) with ESMTP id CF4F58FC52 for ; Thu, 13 Aug 2009 21:58:02 +0000 (UTC) Received: from vesper.usenix.org (vesper.usenix.org [131.106.3.142]) by lonestar.usenix.org (8.14.2/8.14.2) with ESMTP id n7DLj03i026530 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 13 Aug 2009 14:45:38 -0700 (PDT) Message-Id: From: Lionel Garth Jones To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Thu, 13 Aug 2009 14:45:37 -0700 X-Mailer: Apple Mail (2.930.3) X-DCC-Usenix-Metrics: lonestar; whitelist X-Spam-Status: No, score=-1.4 required=6.0 tests=ALL_TRUSTED autolearn=failed version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on lonestar X-Mailman-Approved-At: Thu, 13 Aug 2009 22:39:54 +0000 Subject: USENIX HotPar '10 Call For Papers Now Available X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 13 Aug 2009 21:58:03 -0000 The Program Committee for the 2nd USENIX Workshop on Hot Topics in Parallelism (HotPar '10) invites you to submit position papers. HotPar '10 will bring together researchers and practitioners doing innovative work in the area of parallel computing. HotPar recognizes the broad impact of multicore computing and seeks relevant contributions in all fields, including application design, languages and compilers, systems, and architecture. We request submissions of position papers that propose new directions for research of products in these areas, advocate non-traditional approaches to the problems engendered by parallelism, or potentially generate controversy and discussion. Submissions are due January 24, 2010. More information and submission guidelines are available at http://www.usenix.org/hotpar10/cfpa We look forward to receiving your submissions! Sincerely, Geoff Lowney, Intel David Patterson, University of California, Berkeley HotPar '10 Program Co-Chairs hotpar10chairs@usenix.org From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 14 03:58:44 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46BDF106568B for ; Fri, 14 Aug 2009 03:58:44 +0000 (UTC) (envelope-from bertwiley@gmail.com) Received: from mail-gx0-f227.google.com (mail-gx0-f227.google.com [209.85.217.227]) by mx1.freebsd.org (Postfix) with ESMTP id 04DD28FC41 for ; Fri, 14 Aug 2009 03:58:43 +0000 (UTC) Received: by gxk27 with SMTP id 27so1577283gxk.12 for ; Thu, 13 Aug 2009 20:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=MguD6btSHJDTi5Pt+JWAdAl9DfR1onVd8qo+D+Obtt0=; b=UJVoFOtrxas5pHuKKZ8C6OhBUd4xgVymxXTfCxxBxNI3r1ddn3WLuHHt1xT7asFJ6B Nkqom4k1ur5lSaYsojDNEgMtnjG5cOgpUQfJDKL/vLhpUj1L5peEs7zah9OdVEx6AUHX 2bpjwYB1CZ0OPyEPtDMfd2cv+Q27ZdGJ5vUVk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=XyMQPO5d/+PdAcNJUEyQ8SJ5oRUOqkWfEVaigykmBPXDjMkM/DX3VK/rrM+HuBpkVP vWc7COvACHZCpXkzCTnk73UsNOaNUa9Yd2CkgMt6LthCKmrrZB+MBeVyOgXi1Ckh0/3u dICkJe/cPP+0wQj2q74rb3Aoi9D6N/HDI2Q90= MIME-Version: 1.0 Received: by 10.90.71.15 with SMTP id t15mr871281aga.10.1250220559741; Thu, 13 Aug 2009 20:29:19 -0700 (PDT) Date: Thu, 13 Aug 2009 23:29:19 -0400 Message-ID: <9527461a0908132029xb2c6149r9f51c775d22ae670@mail.gmail.com> From: bert wiley To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Need help trying to to use the ntohl() call with in_addr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 14 Aug 2009 03:58:44 -0000 Hi everyone Im new to list and this question may be out of place. This is my first post. Im new to freebsd and trying to understand how to create a jail from some system calls. I followed the jail subsystem description from the handbook and im having a problem or may be using the call incorrectly. But here is what im trying to do. int main() { struct in_addr ipaddr; struct jail myjail; char path[PATH_MAX]; realpath("/tmp", path); myjail.version = 1; myjail.path = path; myjail.hostname = "testjail"; const char *ip; ip = "192.168.1.142"; inet_aton(ip, &ipaddr); myjail.ip4 = ntohl(ipaddr.s_addr); // I get and error here, invalid conversion from _uint32_t' to in_addr* myjail.ip4 = ipaddr.s_addr; // and and error here, invlid conversion from in_addr_t to in_addr* } I know that there is more that needs to be done but this just a test stub as im trying to work thru the calls and understand whats going on. Any would be appreciated thanks. From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 14 07:44:46 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF1091065690 for ; Fri, 14 Aug 2009 07:44:46 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.freebsd.org (Postfix) with ESMTP id 54B318FC62 for ; Fri, 14 Aug 2009 07:44:46 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-067-247-105.pools.arcor-ip.net [88.67.247.105]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MKv5w-1MbrSv0LJa-0003r5; Fri, 14 Aug 2009 09:44:45 +0200 Received: (qmail 99277 invoked from network); 14 Aug 2009 07:44:44 -0000 Received: from kvm.laiers.local (HELO kvm.localnet) (192.168.4.200) by laiers.local with SMTP; 14 Aug 2009 07:44:44 -0000 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Fri, 14 Aug 2009 09:44:43 +0200 User-Agent: KMail/1.12.0 (Linux/2.6.30-ARCH; KDE/4.3.0; x86_64; ; ) References: <9527461a0908132029xb2c6149r9f51c775d22ae670@mail.gmail.com> In-Reply-To: <9527461a0908132029xb2c6149r9f51c775d22ae670@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200908140944.44141.max@love2party.net> X-Provags-ID: V01U2FsdGVkX182iKNFkxtJdqFv70nCiF8kVY4srlhLKKZ23ft 8EXTOF5YyeTW+l0/MKCrXr/Za1XyFjEPmun0zwqXStrIyrw00e PHdCoa4jztIXQRkmQJelg== Cc: bert wiley Subject: Re: Need help trying to to use the ntohl() call with in_addr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 14 Aug 2009 07:44:46 -0000 On Friday 14 August 2009 05:29:19 bert wiley wrote: > Hi everyone > > Im new to list and this question may be out of place. This is my first > post. Im new to freebsd and trying to understand how to create a jail from > some system calls. I followed the jail subsystem description from the > handbook and im having a problem or may be using the call incorrectly. But > here is what im trying to do. > > > int main() > { > struct in_addr ipaddr; > struct jail myjail; > > char path[PATH_MAX]; > > realpath("/tmp", path); > > myjail.version = 1; > myjail.path = path; > myjail.hostname = "testjail"; > > const char *ip; > ip = "192.168.1.142"; > > inet_aton(ip, &ipaddr); > myjail.ip4 = ntohl(ipaddr.s_addr); // I get and error here, invalid > conversion from _uint32_t' to in_addr* > myjail.ip4 = ipaddr.s_addr; // and and error here, invlid > conversion from in_addr_t to in_addr* > } > > > I know that there is more that needs to be done but this just a test stub > as im trying to work thru the calls and understand whats going on. > Any would be appreciated thanks. Take a look at the jail(2) man page: The ``ip4s'' and ``ip6s'' give the numbers of IPv4 and IPv6 addresses that will be passed via their respective pointers. The ``ip4'' and ``ip6'' pointers can be set to an arrays of IPv4 and IPv6 addresses to be assigned to the prison, or NULL if none. IPv4 addresses must be in network byte order. So you'd do something like the following: myjail.ip4s = 1; inet_aton(ip, &ipaddr); myjail.ip4 = &ipaddr; You don't have to switch byte order. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 14 08:30:32 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53AC9106568D for ; Fri, 14 Aug 2009 08:30:32 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id 0E3B18FC67 for ; Fri, 14 Aug 2009 08:30:31 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 5EA2E41C703; Fri, 14 Aug 2009 10:15:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id bN3bz6qvWYQF; Fri, 14 Aug 2009 10:15:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 8C94741C707; Fri, 14 Aug 2009 10:15:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id BF00A4448EC; Fri, 14 Aug 2009 08:11:26 +0000 (UTC) Date: Fri, 14 Aug 2009 08:11:26 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: freebsd-hackers@freebsd.org In-Reply-To: <200908140944.44141.max@love2party.net> Message-ID: <20090814080915.J93661@maildrop.int.zabbadoz.net> References: <9527461a0908132029xb2c6149r9f51c775d22ae670@mail.gmail.com> <200908140944.44141.max@love2party.net> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: bert wiley Subject: Re: Need help trying to to use the ntohl() call with in_addr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 14 Aug 2009 08:30:32 -0000 On Fri, 14 Aug 2009, Max Laier wrote: > On Friday 14 August 2009 05:29:19 bert wiley wrote: >> Hi everyone >> >> Im new to list and this question may be out of place. This is my first >> post. Im new to freebsd and trying to understand how to create a jail from >> some system calls. I followed the jail subsystem description from the >> handbook and im having a problem or may be using the call incorrectly. But >> here is what im trying to do. >> >> >> int main() >> { >> struct in_addr ipaddr; >> struct jail myjail; >> >> char path[PATH_MAX]; >> >> realpath("/tmp", path); >> >> myjail.version = 1; >> myjail.path = path; >> myjail.hostname = "testjail"; >> >> const char *ip; >> ip = "192.168.1.142"; >> >> inet_aton(ip, &ipaddr); >> myjail.ip4 = ntohl(ipaddr.s_addr); // I get and error here, invalid >> conversion from _uint32_t' to in_addr* >> myjail.ip4 = ipaddr.s_addr; // and and error here, invlid >> conversion from in_addr_t to in_addr* >> } >> >> >> I know that there is more that needs to be done but this just a test stub >> as im trying to work thru the calls and understand whats going on. >> Any would be appreciated thanks. > > Take a look at the jail(2) man page: > > The ``ip4s'' and ``ip6s'' give the numbers of IPv4 and IPv6 addresses > that will be passed via their respective pointers. > > The ``ip4'' and ``ip6'' pointers can be set to an arrays of IPv4 and IPv6 > addresses to be assigned to the prison, or NULL if none. IPv4 addresses > must be in network byte order. > > So you'd do something like the following: > > myjail.ip4s = 1; > inet_aton(ip, &ipaddr); > myjail.ip4 = &ipaddr; > > You don't have to switch byte order. and in that case of 7.2-R or later multi-IP jails the version should not be 1 either. I fixed tools/regressions/priv the other day; maybe this helps a bit as well: http://svn.freebsd.org/viewvc/base/head/tools/regression/priv/main.c?r1=173679&r2=196172 /bz -- Bjoern A. Zeeb What was I talking about and who are you again? From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 14 19:01:43 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8670106568C for ; Fri, 14 Aug 2009 19:01:43 +0000 (UTC) (envelope-from bertwiley@gmail.com) Received: from mail-yx0-f206.google.com (mail-yx0-f206.google.com [209.85.210.206]) by mx1.freebsd.org (Postfix) with ESMTP id 4FEBE8FC41 for ; Fri, 14 Aug 2009 19:01:42 +0000 (UTC) Received: by yxe19 with SMTP id 19so652251yxe.19 for ; Fri, 14 Aug 2009 12:01:42 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20090814080915.J93661@maildrop.int.zabbadoz.net> Received: by 10.91.100.11 with SMTP id c11mr811009agm.1.1250276502305; Fri, 14 Aug 2009 12:01:42 -0700 (PDT) Message-ID: <0016e640d1e0ca8bd304711eaeb7@google.com> Date: Fri, 14 Aug 2009 19:01:42 +0000 From: bertwiley@gmail.com To: "Bjoern A. Zeeb" , bert wiley Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Re: Need help trying to to use the ntohl() call with in_addr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 14 Aug 2009 19:01:43 -0000 Thanks guys On Aug 14, 2009 4:11am, "Bjoern A. Zeeb" wrote: > On Fri, 14 Aug 2009, Max Laier wrote: > On Friday 14 August 2009 05:29:19 bert wiley wrote: > Hi everyone > Im new to list and this question may be out of place. This is my first > post. Im new to freebsd and trying to understand how to create a jail from > some system calls. I followed the jail subsystem description from the > handbook and im having a problem or may be using the call incorrectly. But > here is what im trying to do. > int main() > { > struct in_addr ipaddr; > struct jail myjail; > char path[PATH_MAX]; > realpath("/tmp", path); > myjail.version = 1; > myjail.path = path; > myjail.hostname = "testjail"; > const char *ip; > ip = "192.168.1.142"; > inet_aton(ip, &ipaddr); > myjail.ip4 = ntohl(ipaddr.s_addr); // I get and error here, invalid > conversion from _uint32_t' to in_addr* > myjail.ip4 = ipaddr.s_addr; // and and error here, invlid > conversion from in_addr_t to in_addr* > } > I know that there is more that needs to be done but this just a test stub > as im trying to work thru the calls and understand whats going on. > Any would be appreciated thanks. > Take a look at the jail(2) man page: > The ``ip4s'' and ``ip6s'' give the numbers of IPv4 and IPv6 addresses > that will be passed via their respective pointers. > The ``ip4'' and ``ip6'' pointers can be set to an arrays of IPv4 and IPv6 > addresses to be assigned to the prison, or NULL if none. IPv4 addresses > must be in network byte order. > So you'd do something like the following: > myjail.ip4s = 1; > inet_aton(ip, &ipaddr); > myjail.ip4 = &ipaddr; > You don't have to switch byte order. > and in that case of 7.2-R or later multi-IP jails the version should > not be 1 either. > I fixed tools/regressions/priv the other day; maybe this helps a bit > as well: > http://svn.freebsd.org/viewvc/base/head/tools/regression/priv/main.c?r1=173679&r2=196172 > /bz > -- > Bjoern A. Zeeb What was I talking about and who are you again? From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 14 21:19:32 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66F3C106568C; Fri, 14 Aug 2009 21:19:32 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward11.yandex.ru (forward11.yandex.ru [95.108.130.93]) by mx1.freebsd.org (Postfix) with ESMTP id 1D5B98FC45; Fri, 14 Aug 2009 21:19:32 +0000 (UTC) Received: from webmail117.yandex.ru (webmail117.yandex.ru [95.108.131.137]) by forward11.yandex.ru (Yandex) with ESMTP id 034F9F483ED; Sat, 15 Aug 2009 01:07:50 +0400 (MSD) Received: from localhost (localhost.localdomain [127.0.0.1]) by webmail117.yandex.ru (Yandex) with ESMTP id E77A8372C002; Sat, 15 Aug 2009 01:07:49 +0400 (MSD) X-Yandex-Spam: 1 X-Yandex-Front: webmail117 X-Yandex-TimeMark: 1250284069 Received: from [77.72.136.194] ([77.72.136.194]) by mail.yandex.ru with HTTP; Sat, 15 Aug 2009 01:07:49 +0400 From: "Andrey V. Elsukov" To: freebsd-hackers@freebsd.org,jhb@freebsd.org MIME-Version: 1.0 Message-Id: <147751250284069@webmail117.yandex.ru> Date: Sat, 15 Aug 2009 01:07:49 +0400 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain Cc: Subject: Howto setup multiboot with GPT? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 14 Aug 2009 21:19:32 -0000 Hi, I have installed 8.0-BETA2 amd64 on ZFS root with GPT. I made addition partition and made new ZFS pool, builded and installed i386 world and kernel to this pool. So, is there some way to select from which partition i want to boot? My configuration: > gpart show ad10 => 34 1250263661 ad10 GPT (596G) 34 256 1 freebsd-boot (128K) 290 8388608 2 freebsd-swap (4.0G) 8388898 209715200 3 freebsd-zfs (100G) 218104098 209715200 4 freebsd-zfs (100G) 427819298 822444397 - free - (392G) > zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT amd64 99,5G 10,5G 89,0G 10% ONLINE - x86 99,5G 346M 99,2G 0% ONLINE /mnt > cat /boot/loader.conf zfs_load="YES" vfs.root.mountfrom="zfs:amd64" > zfs list -r amd64 NAME USED AVAIL REFER MOUNTPOINT amd64 10,5G 87,5G 511M legacy amd64/distfiles 1,10G 87,5G 1,10G /usr/ports/distfiles amd64/home 4,29G 87,5G 4,26G /usr/home amd64/local 1,91G 87,5G 1,91G /usr/local amd64/obj 1,29G 87,5G 1,29G /usr/obj amd64/ports 162M 87,5G 162M /usr/ports amd64/src 405M 87,5G 405M /usr/src amd64/tmp 26,7M 87,5G 4,96M /tmp amd64/usr 263M 87,5G 263M /usr amd64/var 532M 87,5G 524K /var amd64/var/crash 411M 87,5G 411M /var/crash amd64/var/db 120M 87,5G 120M /var/db amd64/var/tmp 112K 87,5G 79K /var/tmp > zfs list -r x86 NAME USED AVAIL REFER MOUNTPOINT x86 346M 97,6G 170M legacy x86/local 18K 97,6G 18K /mnt/usr/local x86/tmp 23K 97,6G 23K /mnt/tmp x86/usr 175M 97,6G 175M /mnt/usr x86/var 241K 97,6G 178K /mnt/var x86/var/crash 18,5K 97,6G 18,5K /mnt/var/crash x86/var/db 25K 97,6G 25K /mnt/var/db x86/var/tmp 19K 97,6G 19K /mnt/var/tmp -- WBR, Andrey V. Elsukov From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 15 23:25:30 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1154C106568F for ; Sat, 15 Aug 2009 23:25:30 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-fx0-f205.google.com (mail-fx0-f205.google.com [209.85.220.205]) by mx1.freebsd.org (Postfix) with ESMTP id 899788FC15 for ; Sat, 15 Aug 2009 23:25:29 +0000 (UTC) Received: by fxm1 with SMTP id 1so1689072fxm.7 for ; Sat, 15 Aug 2009 16:25:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=71Q7qokrEp8fGdTeZvUslvLPUQkGDLMs91fQ/OpR09Q=; b=a7VWpgur6bvsYjjxTN/pTB+p6+Kn6WgosgzvOAMQYpV5t9LAhHP9WSO9soUX0KyJXD RozeMgGb9RG07YeA92rgCXhTqIb46X7Ut64KGc8NvswUPGAmW0mtVPgdoKOSJGDQA0k+ xSMmSKfPx3MesnzSvoghItppYemh6CPyBt5yQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=kwbbDrgZ2DYrsiJ/q1wv9lU98R7BupHdkaJjJywun5f4ZTdc+3cK3mewAiy0RTV60/ QWaCk1NIKDYBpdzP3l2cWLaeIVSTu9iQegfg79e/HbQYuZHrAmcnFDXUAyVdAo6Oqqj4 yZQy0J9MeTpJPH3jKMWv4Yu4TndRfqH4OqMEk= MIME-Version: 1.0 Received: by 10.86.20.8 with SMTP id 8mr1772745fgt.44.1250378728224; Sat, 15 Aug 2009 16:25:28 -0700 (PDT) In-Reply-To: <200908152221.n7FMLRuw005799@taverner.cs.berkeley.edu> References: <200908152221.n7FMLRuw005799@taverner.cs.berkeley.edu> Date: Sun, 16 Aug 2009 01:25:28 +0200 Message-ID: <6101e8c40908151625s52ad9b83ue061de3fab97fbf8@mail.gmail.com> From: Oliver Pinter To: David Wagner Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, linux-kernel@vger.kernel.org Subject: Re: Security: information leaks in /proc enable keystroke recovery X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 15 Aug 2009 23:25:30 -0000 On 8/16/09, David Wagner wrote: > At Usenix Security 2009, two researchers announced last week a new > security vulnerability in multi-user Linux systems. They demonstrated > that one user can, in many cases, recover partial information about > the keystrokes that another user types into applications running on > that system. For instance, they demonstrate how a malicious user can > recover partial information about SSH passwords typed by other users, > reducing the password search space by a factor of 250-2000x in > their experiments. Thus, this could facilitate password recovery. > > Question: Are there any plans to modify the Linux kernel to defend > against this kind of attack? > > The paper is here: > > http://www.usenix.org/events/sec09/tech/full_papers/zhang.pdf > > In a nutshell, they exploit the fact that many files in /proc are > world-readable yet contain sensitive information that can leak informatio= n > about inter-keystroke timings. For instance, /proc/$PID/stat reveals the > ESP and EIP registers of the associated process, and is world-readable. > /proc/pid/status is also mentioned as revealing information that could > be exploited in these attacks. > > Based on my understanding of their work, it sounds like some of > the information on those files should perhaps not be world-readable. > It's not clear to me that it's reasonable for the kernel to reveal ESP, > EIP, and other sensitive information about process behavior to everyone > on the same system. > > Are folks already aware of these vulnerabilities? Is there any work > underway to try to address the issues identified in the Usenix Security > paper? > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" i= n > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > [snip] 6.2 Information Leaks in the Procfs of Other UNIX-like Systems Besides Linux, most other UNIX-like systems also im- plement procfs. These implementations vary from case to case, and as a result, their susceptibilities to side- channel attacks also differ. Here we discuss such privacy risks on two systems, FreeBSD and OpenSolaris. FreeBSD manages its process =EF=AC=81les more cautiously than Linux12 : it puts all register values into the =EF=AC=81le /proc/pid/regs that can only be read by the owner of a process, which blocks the information used by our attack. However, we found that other informa- tion released by the procfs can lead to similar attacks. A prominent example is the system time reported by /proc/pid/status, a =EF=AC=81le open to every user. Fig- ure 11 shows the correlations between the time con- sumed by vim and the keystrokes it received, as ob- served in our research. This demonstrates that keystroke events within the process can be identi=EF=AC=81ed from the change of its system time, which makes keystroke eaves- dropping possible. A problem here is that we may not be able to detect special keys a user enters, for example, =E2=80=9CMOV CURSOR=E2=80=9D, which is determined from ESP/EIP in- formation on Linux. A possible solution is using the dis- crepancies of system-time increments triggered by dif- ferent keys being entered to =EF=AC=81ngerprint these individual keys. Further study of this technique is left to our future research. [/snip]