From owner-freebsd-hackers Sun Sep 15 2:24:13 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EF1137B400 for ; Sun, 15 Sep 2002 02:24:12 -0700 (PDT) Received: from priv-edtnes09-hme0.telusplanet.net (mtaout.telus.net [199.185.220.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE0E043E42 for ; Sun, 15 Sep 2002 02:24:11 -0700 (PDT) (envelope-from sh@planetquake.com) Received: from dbs ([216.232.29.145]) by priv-edtnes09-hme0.telusplanet.net (InterMail vM.5.01.04.01 201-253-122-122-101-20011014) with SMTP id <20020915092410.TYAI5461.priv-edtnes09-hme0.telusplanet.net@dbs> for ; Sun, 15 Sep 2002 03:24:10 -0600 Message-ID: <000501c25c99$af6b6d40$911de8d8@slugabed.org> From: "Sean Hamilton" To: Subject: dmesg circular buffer Date: Sun, 15 Sep 2002 02:24:25 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Greetings, As I understand, "dmesg" prints the tail end of a circular buffer stored someplace on the root partition. Is it possible to have it read back beyond the last reboot? Occasionaly I see it do this, though I have no idea why. In this case, I have a kernel that panicked, and am looking for clues. Nothing in /var/log/messages... sh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 2:27: 9 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C17F37B400 for ; Sun, 15 Sep 2002 02:27:08 -0700 (PDT) Received: from critter.freebsd.dk (port757.uc1-esp.isdn-lan.cybercity.dk [212.242.98.245]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0341C43E3B for ; Sun, 15 Sep 2002 02:27:07 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.3/8.12.2) with ESMTP id g8F9QuBQ079906; Sun, 15 Sep 2002 11:26:57 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: "Sean Hamilton" Cc: hackers@FreeBSD.ORG Subject: Re: dmesg circular buffer In-Reply-To: Your message of "Sun, 15 Sep 2002 02:24:25 PDT." <000501c25c99$af6b6d40$911de8d8@slugabed.org> Date: Sun, 15 Sep 2002 11:26:56 +0200 Message-ID: <79904.1032082016@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <000501c25c99$af6b6d40$911de8d8@slugabed.org>, "Sean Hamilton" write s: >Greetings, > >As I understand, "dmesg" prints the tail end of a circular buffer stored >someplace on the root partition. Is it possible to have it read back beyond >the last reboot? Occasionaly I see it do this, though I have no idea why. It's stored in RAM, not on disk. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 2:30:24 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C81D437B400 for ; Sun, 15 Sep 2002 02:30:22 -0700 (PDT) Received: from matrix.42.org (matrix.42.org [194.246.250.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63D5443E7B for ; Sun, 15 Sep 2002 02:30:21 -0700 (PDT) (envelope-from sec@42.org) Received: (from sec@localhost) by matrix.42.org (8.8.8/8.8.5) id LAA10103 (sender ); Sun, 15 Sep 2002 11:30:16 +0200 (CEST) Date: Sun, 15 Sep 2002 11:30:15 +0200 From: Stefan `Sec` Zehl To: Pawel Jakub Dawidek Cc: freebsd-hackers@freebsd.org Subject: Re: Changing process informations. Message-ID: <20020915093015.GA9912@matrix.42.org> References: <20020915030157.GP68652@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline In-Reply-To: <20020915030157.GP68652@garage.freebsd.pl> User-Agent: Mutt/1.3.27i I-love-doing-this: really X-Modeline: vim:set ts=8 sw=4 smarttab tw=72 si noic notitle: Accept-Languages: de, en X-URL: http://sec.42.org/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Sep 15, 2002 at 05:01:57AM +0200, Pawel Jakub Dawidek wrote: > Hello hackers... > > When I want change process real or effective uid in kld module > I got functions change_ruid() and change_euid(). > I need change many others informations about process. > Correct me if I'm wrong: [...] I'm not sure if that works as you expected. Have you taken care of credential sharing? I have once written a program to change the uid/euid of a running process (see ftp://ftp.42.org/pub/B/presto/presto-1.3.tar.gz), but due to credential sharing, this will sometimes effect more than one process of the same user (usually a vi started from a shell will inherit the same credentials for example) CU, Sec -- If architects built buildings like programmers build programs, the first woodpecker to come along would destroy civilization. --2oS5YaxWCcQjTEyO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: 2.6.3i iQEVAwUBPYRTH55z6wpNWO5RAQE8Qgf+PLPkj49gEWHa9cYoscXqV5tY4wyKMeFj yDDhHndrh+Yj/HjHawjp/Xz2Nfbi993bWtmxkSOXQ0fee+faaRJQ7fvvDC5bj60z lo5ToigW/b+LnR+6rg72I2+3QRcbZ4bxEzeXEzTwyDrnWGiSj6PBdy5BQr6N0Q4b q12leqvn4YuQvQSEBeguUCycv+yGl1wkfU4c4E9WnAMqnSHYAcb+EZ6chZ+Nimgn wHNKDqkt3ZBMrNDmusggMM2z7SxoIsviSnbPGi9tnIefccNe6JeVruqo2PsUT3WT Jk2YWktbdshEPfZm150BwZrjNp98QWILDT5u4waYjE6/eOcbaSud1w== =0XVP -----END PGP SIGNATURE----- --2oS5YaxWCcQjTEyO-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 2:36:58 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42A5337B400 for ; Sun, 15 Sep 2002 02:36:56 -0700 (PDT) Received: from nebula.wanadoo.fr (ca-sqy-3-197.abo.wanadoo.fr [80.8.56.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id B574B43E65 for ; Sun, 15 Sep 2002 02:36:54 -0700 (PDT) (envelope-from dak@wanadoo.fr) Received: from nebula.wanadoo.fr (localhost [127.0.0.1]) by nebula.wanadoo.fr (8.12.5/8.12.5) with ESMTP id g8F9crTA003714; Sun, 15 Sep 2002 11:38:53 +0200 (CEST) (envelope-from dak@nebula.wanadoo.fr) Received: (from dak@localhost) by nebula.wanadoo.fr (8.12.5/8.12.5/Submit) id g8F9cqFg003713; Sun, 15 Sep 2002 11:38:53 +0200 (CEST) Date: Sun, 15 Sep 2002 11:38:52 +0200 From: =?iso-8859-15?Q?Aur=E9lien?= Nephtali To: Sean Hamilton Cc: hackers@FreeBSD.ORG Subject: Re: dmesg circular buffer Message-ID: <20020915093852.GA3645@nebula.wanadoo.fr> References: <000501c25c99$af6b6d40$911de8d8@slugabed.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3MwIy2ne0vdjdPXF" Content-Disposition: inline In-Reply-To: <000501c25c99$af6b6d40$911de8d8@slugabed.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, It seems that on some machines, while rebooting, the memory where the kernel message buffer is stored, is not cleaned (on my laptop it's the case). If your computer has this *bug*, doing 'dmesg' will display all messages since you powered on you computer. Otherwise, if your memory is cleaned correctly I don't know how you can recover last boot messages (maybe you could write a script which writes the content of /var/run/dmesg.boot into a file named dmesg-date.boot) I have patched 'dmesg' to add an option to choose to display all messages or only the last; if your system has the 'memory problem' I can send you the patches (it won't help you recovering old messages but for further calls to 'dmesg' if you have rebooted many many times, the display will be less confusing) I have submited those patches to a committer but he hasn't commited them yet. -- Aur=E9lien PS: when i say 'memory problem', I don't really know if it's deliberate or = not but I think it's not :p On Sun, Sep 15, 2002 at 02:24:25AM -0700, Sean Hamilton wrote: > Greetings, >=20 > As I understand, "dmesg" prints the tail end of a circular buffer stored > someplace on the root partition. Is it possible to have it read back beyo= nd > the last reboot? Occasionaly I see it do this, though I have no idea why. >=20 > In this case, I have a kernel that panicked, and am looking for clues. > Nothing in /var/log/messages... >=20 > sh >=20 >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message --3MwIy2ne0vdjdPXF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9hFUsDNsbHbt8ok8RAom/AKCg+BLUJG1O1CDZD0IDIIL5F8xc+gCghWnF wnELdzk+rOVjc+F0YW3I08M= =b6Ge -----END PGP SIGNATURE----- --3MwIy2ne0vdjdPXF-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 2:39:42 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC89037B400 for ; Sun, 15 Sep 2002 02:39:41 -0700 (PDT) Received: from priv-edtnes11-hme0.telusplanet.net (fepout3.telus.net [199.185.220.238]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EE4443E77 for ; Sun, 15 Sep 2002 02:39:41 -0700 (PDT) (envelope-from sh@planetquake.com) Received: from dbs ([216.232.29.145]) by priv-edtnes11-hme0.telusplanet.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with SMTP id <20020915093940.GPXD22374.priv-edtnes11-hme0.telusplanet.net@dbs> for ; Sun, 15 Sep 2002 03:39:40 -0600 Message-ID: <001b01c25c9b$d955cb80$911de8d8@slugabed.org> From: "Sean Hamilton" To: References: <79904.1032082016@critter.freebsd.dk> Subject: Re: dmesg circular buffer Date: Sun, 15 Sep 2002 02:39:54 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Well, I seem to have a reproducable kernel panic / lockup, 4.6.2-RELEASE, custom kernel. Specifically, I have an ISO image which I'm mounting as a CD-ROM device in Windows through Samba, and attempting to read from. (ie, mounting in windows via daemontools, not using vnconfig.) So, there seems to be random reads to this file, about 700 MB. I just successfully cat > /dev/null the entire file, so I don't think it's a media error. I haven't got access to the console, I can only call reboots... what to do? I haven't got much more info than this... sh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 3:20:10 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41D7037B400 for ; Sun, 15 Sep 2002 03:20:09 -0700 (PDT) Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9E4A43E6E for ; Sun, 15 Sep 2002 03:20:08 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020915102008.SDWA26805.rwcrmhc52.attbi.com@InterJet.elischer.org>; Sun, 15 Sep 2002 10:20:08 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id DAA87882; Sun, 15 Sep 2002 03:06:05 -0700 (PDT) Date: Sun, 15 Sep 2002 03:06:05 -0700 (PDT) From: Julian Elischer To: Sean Hamilton Cc: hackers@freebsd.org Subject: Re: dmesg circular buffer In-Reply-To: <001b01c25c9b$d955cb80$911de8d8@slugabed.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 15 Sep 2002, Sean Hamilton wrote: > Well, I seem to have a reproducable kernel panic / lockup, 4.6.2-RELEASE, > custom kernel. Specifically, I have an ISO image which I'm mounting as a > CD-ROM device in Windows through Samba, and attempting to read from. (ie, > mounting in windows via daemontools, not using vnconfig.) > > So, there seems to be random reads to this file, about 700 MB. I just > successfully cat > /dev/null the entire file, so I don't think it's a media > error. > > I haven't got access to the console, I can only call reboots... what to do? > I haven't got much more info than this... do you have 2 machines there? if so cross connect their consoles.. > > sh > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 3:20:16 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AF5837B406 for ; Sun, 15 Sep 2002 03:20:13 -0700 (PDT) Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id B83ED43E6E for ; Sun, 15 Sep 2002 03:20:12 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020915102011.SDWG26805.rwcrmhc52.attbi.com@InterJet.elischer.org>; Sun, 15 Sep 2002 10:20:11 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id DAA87874; Sun, 15 Sep 2002 03:03:42 -0700 (PDT) Date: Sun, 15 Sep 2002 03:03:41 -0700 (PDT) From: Julian Elischer To: Sean Hamilton Cc: hackers@freebsd.org Subject: Re: dmesg circular buffer In-Reply-To: <000501c25c99$af6b6d40$911de8d8@slugabed.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 15 Sep 2002, Sean Hamilton wrote: > Greetings, > > As I understand, "dmesg" prints the tail end of a circular buffer stored > someplace on the root partition. Is it possible to have it read back beyond > the last reboot? Occasionaly I see it do this, though I have no idea why. > > In this case, I have a kernel that panicked, and am looking for clues > Nothing in /var/log/messages... The buffer is the last N bytes of ram, and the housekeeping for it is with it.. If the BIOS doesn't clear it, it will last beyond a reboot. The incoming new kernel will recognise a valid buffer and continue to use it without overwriting teh old contents.. very useful after a crash. I often see this. It may be related with the 'quick boot' that some BIOS offer as an option. (takes less time if you do not clear RAM.) julian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 3:49:45 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6EB9137B400 for ; Sun, 15 Sep 2002 03:49:43 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD68043E6E for ; Sun, 15 Sep 2002 03:49:42 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 9DE8E3ABD40; Sun, 15 Sep 2002 12:53:59 +0200 (CEST) Date: Sun, 15 Sep 2002 12:53:59 +0200 From: Pawel Jakub Dawidek To: Stefan `Sec` Zehl Cc: freebsd-hackers@freebsd.org Subject: Re: Changing process informations. Message-ID: <20020915105359.GS68652@garage.freebsd.pl> References: <20020915030157.GP68652@garage.freebsd.pl> <20020915093015.GA9912@matrix.42.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="WTbgq2twYBxfsYA6" Content-Disposition: inline In-Reply-To: <20020915093015.GA9912@matrix.42.org> X-PGP-Key-URL: http://garage.freebsd.pl/jules.pgp X-OS: FreeBSD 4.6-STABLE i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --WTbgq2twYBxfsYA6 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 15, 2002 at 11:30:15AM +0200, Stefan `Sec` Zehl wrote: +> On Sun, Sep 15, 2002 at 05:01:57AM +0200, Pawel Jakub Dawidek wrote: +> > Hello hackers... +> >=20 +> > When I want change process real or effective uid in kld module +> > I got functions change_ruid() and change_euid(). +> > I need change many others informations about process. +> > Correct me if I'm wrong: +> [...] +>=20 +> I'm not sure if that works as you expected. Have you taken care of +> credential sharing? I have once written a program to change the uid/euid +> of a running process (see +> ftp://ftp.42.org/pub/B/presto/presto-1.3.tar.gz), but due to credential +> sharing, this will sometimes effect more than one process of the same +> user (usually a vi started from a shell will inherit the same +> credentials for example) But I use crcopy() funtion to create new credential and those parts of code are taken from system setuid() and setgid() functions... --=20 Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. --WTbgq2twYBxfsYA6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPYRmxz/PhmMH/Mf1AQGZgQP9Eu/ZjTRTNnMztqF3srOK9NB0uZ5s2iSa bdfsvYEdaHcY5wjIz+BDTF/qaeex7x6G8ZqoipQptF+tbo35tIaqbEADw1gxlXJ7 yJQufdhXNUCQlKE3QKefjb5JR3t6EY2JyK4rUavcbxH8pxlJOqJu5O2xOsFXcEMG 9f5pKJYx8/E= =cf70 -----END PGP SIGNATURE----- --WTbgq2twYBxfsYA6-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 3:54: 4 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F026D37B400 for ; Sun, 15 Sep 2002 03:53:59 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6939443E42 for ; Sun, 15 Sep 2002 03:53:59 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id EAD713ABD40; Sun, 15 Sep 2002 12:58:15 +0200 (CEST) Date: Sun, 15 Sep 2002 12:58:15 +0200 From: Pawel Jakub Dawidek To: freebsd-hackers@freebsd.org Subject: Re: Changing process informations. Message-ID: <20020915105815.GT68652@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="+nLR7g8KNfrRqv5t" Content-Disposition: inline X-PGP-Key-URL: http://garage.freebsd.pl/jules.pgp X-OS: FreeBSD 4.6-STABLE i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --+nLR7g8KNfrRqv5t Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 14, 2002 at 11:05:11PM -0600, M. Warner Losh wrote: +> In message: <20020915030157.GP68652@garage.freebsd.pl> +> Pawel Jakub Dawidek writes: +> : Hello hackers... +> :=20 +> : When I want change process real or effective uid in kld module +> : I got functions change_ruid() and change_euid(). +> : I need change many others informations about process. +>=20 +> Why do you want to cahnge the process real or effective id from a kld +> module? That seems to me to be violating the normal policy +> proceedures that the kernel should be enforcing. This is for security reasons:) I'm writing module that will be complete security solution. Where You could define policies per process. Old version of this stuff works like systrace, new one is much more functional and You can specify capabilities per process. Here You got some example configuration files: http://garage.freebsd.pl/cerb-ng/start.cb http://garage.freebsd.pl/cerb-ng/ping.cb http://garage.freebsd.pl/cerb-ng/passwd.cb http://garage.freebsd.pl/cerb-ng/openssh.cb http://garage.freebsd.pl/cerb-ng/end.cb Most of code is done already, but I have to be sure that I don't do any ugly/evil things that's why I'm asking. Any comments/ideas/solutions are welcome. --=20 Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. --+nLR7g8KNfrRqv5t Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPYRnxz/PhmMH/Mf1AQFZfAQAkvpPh+REFEWxRVQSau2aILVL8VTf2xcD x68iAJvQFtG8Ie+aivpjXvYbf6EpO23+BcMG+P/gyVgGXSaRbDXE4EQGFsOLp6ik mp81dcPZVAiJ2cF9BdBz20uu26TotleeSA1m4ENPzTQovQx25QW0LLSgEudR9FyF hHsn7ypZU6c= =nvnX -----END PGP SIGNATURE----- --+nLR7g8KNfrRqv5t-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 4:19: 9 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B11A37B400 for ; Sun, 15 Sep 2002 04:18:56 -0700 (PDT) Received: from segfault.kiev.ua (segfault.kiev.ua [193.193.193.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C86143E4A for ; Sun, 15 Sep 2002 04:18:53 -0700 (PDT) (envelope-from netch@iv.nn.kiev.ua) Received: (from uucp@localhost) by segfault.kiev.ua (8) with UUCP id OHD27335; Sun, 15 Sep 2002 14:18:32 +0300 (EEST) (envelope-from netch@iv.nn.kiev.ua) Received: (from netch@localhost) by iv.nn.kiev.ua (8.12.3/8.12.3) id g8FBEMXN001277; Sun, 15 Sep 2002 14:14:22 +0300 (EEST) (envelope-from netch) Date: Sun, 15 Sep 2002 14:14:22 +0300 From: Valentin Nechayev To: Terry Lambert Cc: Jev , hackers@FreeBSD.ORG Subject: Re: gethostbyname_r() fbsd equiv? Message-ID: <20020915111422.GA1077@iv.nn.kiev.ua> References: <20020913145830.GB41842@ecad.org> <3D820700.DB53B0F9@mindspring.com> <20020913160214.GB42538@ecad.org> <3D820DD0.985F9C66@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D820DD0.985F9C66@mindspring.com> X-42: On Organization: Dark side of coredump Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Fri, Sep 13, 2002 at 09:09:52, tlambert2 (Terry Lambert) wrote about "Re: gethostbyname_r() fbsd equiv?": >> The "real" gethostbyname_r() that takes 3 params is what the code Im >> attempting to port uses. As I implied earlier, my C competence is far >> below par, so for me to write this code would be far for trivial for >> _me_ :) TL> This is the HP/UX or AIX version of the interface. SUSv3 doesn't know any gethostbyname_r. One can select either HP-UX/AIX or Solaris/Linux version of interface, but the more correct way is possibly to inplement getaddrinfo() in thread-safe way. getaddrinfo() is known even for Microsoft (latest versions). For now I can't understand why thread-safe resolver from BIND >= 8.2 wasn't imported. For applications where it is nesessary (e.g. milter filter with extended checking of sender validity), we had to compile libbind and link it in non-natural way.;( getaddrinfo/getnameinfo can be rewritten for thread-safe resolver mechanically, without advanced thinking. P.S. BIND source has version of gethostbyaddr_r and only it should be named as canonical. /netch To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 4:19:19 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AA6C37B401 for ; Sun, 15 Sep 2002 04:19:08 -0700 (PDT) Received: from segfault.kiev.ua (segfault.kiev.ua [193.193.193.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1C2643E42 for ; Sun, 15 Sep 2002 04:19:05 -0700 (PDT) (envelope-from netch@iv.nn.kiev.ua) Received: (from uucp@localhost) by segfault.kiev.ua (8) with UUCP id OHH27336; Sun, 15 Sep 2002 14:18:57 +0300 (EEST) (envelope-from netch@iv.nn.kiev.ua) Received: (from netch@localhost) by iv.nn.kiev.ua (8.12.3/8.12.3) id g8FBG8nk001320; Sun, 15 Sep 2002 14:16:08 +0300 (EEST) (envelope-from netch) Date: Sun, 15 Sep 2002 14:16:08 +0300 From: Valentin Nechayev To: Jev Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: gethostbyname_r() fbsd equiv? Message-ID: <20020915111608.GB1077@iv.nn.kiev.ua> References: <20020913145830.GB41842@ecad.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020913145830.GB41842@ecad.org> X-42: On Organization: Dark side of coredump Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Fri, Sep 13, 2002 at 15:58:30, jev (Jev) wrote about "gethostbyname_r() fbsd equiv?": J> Im trying to build some software on freebsd, which wants to use J> the thread safe gethostbyname_r(). Despite having very bad C skills im J> going to attempt to patch it. What would I use in place of J> gethostbyname_r() on freebsd? Compile library from BIND libraries (even from FreeBSD distribution) /netch To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 4:25: 9 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E8E137B400 for ; Sun, 15 Sep 2002 04:24:53 -0700 (PDT) Received: from smtp02.01.246.ne.jp (smtp02.01.246.ne.jp [210.253.192.40]) by mx1.FreeBSD.org (Postfix) with SMTP id 378FC43E65 for ; Sun, 15 Sep 2002 04:24:52 -0700 (PDT) (envelope-from jir@01.246.ne.jp) Received: (qmail 29827 invoked by alias); 15 Sep 2002 20:24:44 +0900 Received: (qmail 29711 invoked from network); 15 Sep 2002 20:24:41 +0900 Received: from unknown (HELO mebius2) (210.253.214.147) by tp01002 with SMTP; 15 Sep 2002 20:24:41 +0900 Message-ID: <020601c25ca9$6c185e80$0201a8c0@mebius2> From: "jir" To: , , , "=?iso-2022-jp?B?GyRCQCQzJjtxS1wbKEI=?=" , Cc: , , , , , , , Subject: =?iso-2022-jp?B?Rnc6IFthcmd1ZTo2NDY3XSBSZTogGyRCJEkkJiQ3JEZGOxsoQg==?= =?iso-2022-jp?B?GyRCTykkLDlxMUQkRyRKJC0kYyRKJGkkcyROJEckOSQrISkbKEI=?= Date: Sun, 15 Sep 2002 20:17:03 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message -----=20 =1B$BAw?. =1B$B08@h=1B(B : =1B$BAw?.F|;~=1B(B : 2002=1B$BG/=1B(B 9=1B$B7n=1B(B 15=1B$BF|=1B(B = =1B$BF|MKF|=1B(B =1B$B8a8e=1B(B 07:45 =1B$B7oL>=1B(B : [argue:6467] Re: = =1B$B$I$&$7$FF;O)$,9q1D$G$J$-$c$J$i$s$N$G$9$+!)=1B(B JIR =1B$B$G$9!#=1B(B =1B$B$3$s$P$s$O!"$_$J$5$s!#=1B(B : =1B$B$_$JMM!"=1B(Bjir=1B$B$5$s!"$3$s$K$A$O!#=1B(B : =1B$B#J#i#r<0#S#C#M!J%5%W%i%$!&%A%'!<%s!&%^%M%8%a%s%H!K!'=1B(B =1B$B%5%W%i%$!&%A%'!<%s=1B(B =1B$B9qL1@$O@$,=3D06r$+$i1Q:M$KJQ?H!$,F|6d$X;X<(=1B= (B =1B$BF|6d?77tH/9T#G#D#PBPHf#3A}$7$NA}2CJ,!e$2!J%G%U%l!K@/I\@V;z9q:DA}2C!)=1B(B =1B$BF;O)8xCD$,%<%M%3%s$KH/Cm!.9)L3E9H/Cm!.Gd$j4k6H!#= =1B(B =1B$B;q;:!"@8;:%7%9%F%`A}2C!J=1B(BGDP=1B$BBPHf;fJ>A}:~%G%U%l2r>C@G<}A}2C@= V;zJV:Q!K=1B(B =1B$B!e>:!Z7t2qe>:!Dj$G$N8m2r$G$9!#=1B(B : =1B$BF;O)8xCD!a@kEA%;%0%a%s%H=1B(B : =1B$B@G@)?35D2q!a9-9p%9%]%s%5!<=1B(B : =1B$B%<%M%3%s!a7z@_$N0Y$N%5%V!&%5%W%i%$!&%A%'!<%s=1B(B : =1B$B6d9T!a7z@_$K=3DP;q=1B(B : =1B$BEj;q2H!a6d9T$K=3DP;q=1B(B : =1B$B9qL1!aF;O);HMQ!"G<@G=1B(B :=20 : =1B$B#S#C#MA4BN$N@UG$u67$G= $9$M!#=1B(B =1B$BA0Nr$d7k2L!"$+$i@53N$KH=3DCG$7$F$^$9!#=1B(B =1B$B$$$^$d9qFb$NF;O)$r4Z9q$d%m%7%"!"%"%i%9%+$H$D$J$2$k%0%m!<%P%k=1B(B =1B$B2=3D$N8x6&:b$,5a$a$i$l$F$$$^$9!"%7%9%F%`$N$_$@$1$G!"@83hJ*;q$,2s$i$J= $1$l$P=1B(B =1B$B!JHt9T5!$8$c%3%9%H9b!KU{$N$h$&$J7P:Q!"$D$^$j%P%V%k$G$9!#=1B(B =1B$B?.MQAOB$!J6b8"$N$_!K$N$_$O!"J*N.$,=1B(BPOS=1B$B!"=1B(BSCM=1B$B$J$I$G= 4IM}$5$l;O$a$F8zN(2=3D$5$l$^$9!#=1B(B : =1B$B#S#C#M$NL\E*$O=1B(B =1B$BF|K\$N#S#C#M$N<:GT$O2<@A$1$$$8$a$H2$JF$+$iHcH=3D$5$l!"=1B(B =1B$B6(NO2q.$K$9$k=1B(B =1B$B3F?M3F2q.4k6H$H$O8@$$$^$;$s$,!#=1B(B =1B$B8@$C$F$^$9!#=1B(B : = =1B$B;YG[$r40A4$K$9$k0Y$K#S#C#MA4BN$r2q:YK&$NJ#;($5$O!"%9!<%Q!<%3%s%T%e%&%?!<$K$b7W;;$5$l$J$$=1B(B =1B$B46>p!"E7@-!"D>46$,$"$j$^$9!#1ieh!"7P83!"J[=3D~$G$9!"=1B(B =1B$B$=3D$3$X$$$/$HF|6d!"!!=1B(Beditorialstaff@weeklypost.com = http://www.weeklypost.com/jp/020920jp/index.htm =1B$B!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~=1B(B --[PR]------------------------------------------------------------------ =1B$B!!!!!!!!!!!!!!!!!!"v=1B(B = =1B$B%I%a%$%sA0=1B(B.com=1B$B"v=1B(B =1B$B!!%[(-!<(-%`(-%Z(-!<(-%8(-$N(-=3D-5R(-%"(-%C(-%W(-4V(-0c(-$$(-$J(-$7= (-=1B(B =1B$B!!(,(0(,(0(,(0(,(0(,(0(,(0(,(0(,(0(,(0(,(0(,(0(,(0(,(0(,(0(,(0(,(0(,= (0=1B(B =1B$B!|=1B(B =1B$B8D?M!&K!?M3hMQ=3D(A~!|=1B(B =1B$B=85R7cA}=1B(B = =1B$B!|=1B(B =1B$B4JC1%a!<%k%"%I%l%9=1B(B =1B$B!|=1B(B = e-=1B$B%S%8%M%9=1B(B =1B$B!|=1B(B =1B$B!!!!!!!!=1B(B http://www.onamae.com/usage/katsuyo.shtml?mid=104030 ------------------------------------------------------------------[PR]-- Global Media Online www.gmo.jp http://www.exist.net/ml/argue/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 4:40:10 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 290FC37B400 for ; Sun, 15 Sep 2002 04:40:08 -0700 (PDT) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id A100B43E3B for ; Sun, 15 Sep 2002 04:40:07 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc02.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020915114007.LNXF23613.sccrmhc02.attbi.com@InterJet.elischer.org>; Sun, 15 Sep 2002 11:40:07 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id EAA88175; Sun, 15 Sep 2002 04:32:22 -0700 (PDT) Date: Sun, 15 Sep 2002 04:32:21 -0700 (PDT) From: Julian Elischer To: Pawel Jakub Dawidek Cc: freebsd-hackers@freebsd.org Subject: Re: Changing process informations. In-Reply-To: <20020915105815.GT68652@garage.freebsd.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 15 Sep 2002, Pawel Jakub Dawidek wrote: > On Sat, Sep 14, 2002 at 11:05:11PM -0600, M. Warner Losh wrote: > +> In message: <20020915030157.GP68652@garage.freebsd.pl> > +> Pawel Jakub Dawidek writes: > +> : Hello hackers... > +> : > +> : When I want change process real or effective uid in kld module > +> : I got functions change_ruid() and change_euid(). > +> : I need change many others informations about process. > +> > +> Why do you want to cahnge the process real or effective id from a kld > +> module? That seems to me to be violating the normal policy > +> proceedures that the kernel should be enforcing. Ah I tink I found the name for the OpenBSD versin.. I think it's systrace.. It intercepts and validates all syscalls made by a process. including open() where it compares the names being upenned against a regexp. > > This is for security reasons:) > I'm writing module that will be complete security solution. > Where You could define policies per process. > Old version of this stuff works like systrace, new one is > much more functional and You can specify capabilities > per process. > Here You got some example configuration files: > > http://garage.freebsd.pl/cerb-ng/start.cb > http://garage.freebsd.pl/cerb-ng/ping.cb > http://garage.freebsd.pl/cerb-ng/passwd.cb > http://garage.freebsd.pl/cerb-ng/openssh.cb > http://garage.freebsd.pl/cerb-ng/end.cb > > Most of code is done already, but I have to be sure that I don't > do any ugly/evil things that's why I'm asking. > > Any comments/ideas/solutions are welcome. > > -- > Pawel Jakub Dawidek > UNIX Systems Administrator > http://garage.freebsd.pl > Am I Evil? Yes, I Am. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 4:40:23 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CDB9937B406 for ; Sun, 15 Sep 2002 04:40:19 -0700 (PDT) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 540B843E6A for ; Sun, 15 Sep 2002 04:40:18 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc02.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020915114017.LNZF23613.sccrmhc02.attbi.com@InterJet.elischer.org>; Sun, 15 Sep 2002 11:40:17 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id EAA88154; Sun, 15 Sep 2002 04:22:30 -0700 (PDT) Date: Sun, 15 Sep 2002 04:22:29 -0700 (PDT) From: Julian Elischer To: Pawel Jakub Dawidek Cc: freebsd-hackers@freebsd.org Subject: Re: Changing process informations. In-Reply-To: <20020915105815.GT68652@garage.freebsd.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 15 Sep 2002, Pawel Jakub Dawidek wrote: > On Sat, Sep 14, 2002 at 11:05:11PM -0600, M. Warner Losh wrote: > +> In message: <20020915030157.GP68652@garage.freebsd.pl> > +> Pawel Jakub Dawidek writes: > +> : Hello hackers... > +> : > +> : When I want change process real or effective uid in kld module > +> : I got functions change_ruid() and change_euid(). > +> : I need change many others informations about process. > +> > +> Why do you want to cahnge the process real or effective id from a kld > +> module? That seems to me to be violating the normal policy > +> proceedures that the kernel should be enforcing. > > This is for security reasons:) > I'm writing module that will be complete security solution. > Where You could define policies per process. > Old version of this stuff works like systrace, new one is > much more functional and You can specify capabilities > per process. > Here You got some example configuration files: > > http://garage.freebsd.pl/cerb-ng/start.cb > http://garage.freebsd.pl/cerb-ng/ping.cb > http://garage.freebsd.pl/cerb-ng/passwd.cb > http://garage.freebsd.pl/cerb-ng/openssh.cb > http://garage.freebsd.pl/cerb-ng/end.cb > > Most of code is done already, but I have to be sure that I don't > do any ugly/evil things that's why I'm asking. > > Any comments/ideas/solutions are welcome. When it is time for an invention, it get's invented many times at that time.... OpenBSD have this. It has been completed, including a GUI front end. It was demo'd at USENIX.. very cool. (maybe someone can tell us he name? I looked but can't find it) Someone was porting it to FreeBSD.. julian > > -- > Pawel Jakub Dawidek > UNIX Systems Administrator > http://garage.freebsd.pl > Am I Evil? Yes, I Am. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 4:45:41 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4640037B400 for ; Sun, 15 Sep 2002 04:45:39 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id A893243E3B for ; Sun, 15 Sep 2002 04:45:38 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 6C8073ABD40; Sun, 15 Sep 2002 13:49:35 +0200 (CEST) Date: Sun, 15 Sep 2002 13:49:35 +0200 From: Pawel Jakub Dawidek To: Julian Elischer Cc: freebsd-hackers@freebsd.org Subject: Re: Changing process informations. Message-ID: <20020915114935.GU68652@garage.freebsd.pl> References: <20020915105815.GT68652@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="2mNuWrpDTYoom6W8" Content-Disposition: inline In-Reply-To: X-PGP-Key-URL: http://garage.freebsd.pl/jules.pgp X-OS: FreeBSD 4.6-STABLE i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --2mNuWrpDTYoom6W8 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 15, 2002 at 04:32:21AM -0700, Julian Elischer wrote: +>=20 +>=20 +> On Sun, 15 Sep 2002, Pawel Jakub Dawidek wrote: +>=20 +> > On Sat, Sep 14, 2002 at 11:05:11PM -0600, M. Warner Losh wrote: +> > +> In message: <20020915030157.GP68652@garage.freebsd.pl> +> > +> Pawel Jakub Dawidek writes: +> > +> : Hello hackers... +> > +> :=20 +> > +> : When I want change process real or effective uid in kld module +> > +> : I got functions change_ruid() and change_euid(). +> > +> : I need change many others informations about process. +> > +>=20 +> > +> Why do you want to cahnge the process real or effective id from a k= ld +> > +> module? That seems to me to be violating the normal policy +> > +> proceedures that the kernel should be enforcing. +>=20 +> Ah I tink I found the name for the OpenBSD versin.. +> I think it's systrace.. Nope. Systrace is working like old cerb version: http://garage.freebsd.pl/cerb.tgz It can downgrade permission, deny some actions, but it cannot add any priviliges. Cerb-ng is something diffrent, check example configs. With cerb-ng You don't need any set-uid-root binaries or root demons and much more. --=20 Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. --2mNuWrpDTYoom6W8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPYRzzz/PhmMH/Mf1AQH+4QP/c8md0NAmbRdLNbf3/aFqNOb6UTgXzP+X QoXN+2/2xMgzwx+o5t7slcWuCnkW1sr8ftJTa7OiwwEVASJdv95hK8lu3aq78Yuh L1mCMMHV9ktssg2yE91J8bkAXoC11FyN0jaX38AvfY75UIWR0rCp9d9K54N0uvy8 YudfEG9BAPc= =/sBe -----END PGP SIGNATURE----- --2mNuWrpDTYoom6W8-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 5:20:10 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0793737B4D8; Sun, 15 Sep 2002 05:20:08 -0700 (PDT) Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACA2C43E77; Sun, 15 Sep 2002 05:20:07 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020915122007.VSSP16829.rwcrmhc51.attbi.com@InterJet.elischer.org>; Sun, 15 Sep 2002 12:20:07 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id FAA88326; Sun, 15 Sep 2002 05:04:02 -0700 (PDT) Date: Sun, 15 Sep 2002 05:04:01 -0700 (PDT) From: Julian Elischer To: Pawel Jakub Dawidek Cc: freebsd-hackers@freebsd.org, rwatson@freebsd.org Subject: Re: Changing process informations. In-Reply-To: <20020915114935.GU68652@garage.freebsd.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 15 Sep 2002, Pawel Jakub Dawidek wrote: > On Sun, Sep 15, 2002 at 04:32:21AM -0700, Julian Elischer wrote: > +> > +> Ah I think I found the name for the OpenBSD version.. > +> I think it's called systrace.. > > Nope. Systrace is working like old cerb version: > > http://garage.freebsd.pl/cerb.tgz > > It can downgrade permission, deny some actions, but it cannot add any > priviliges. Cerb-ng is something diffrent, check example configs. > > With cerb-ng You don't need any set-uid-root binaries or root demons > and much more. if this is being done on -current then it occurs to me that you may be aboe to make use of: 1/ the MAC stuff rob watson is doing 2/ teh extended atribute stuff being done, where a program can store a lot of meta data with itself (like a MACOS data fork) including possible the ruleset for itself. Very cool.. do you have a writup of cerb-ng? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 5:39:40 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82C0537B400 for ; Sun, 15 Sep 2002 05:39:38 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id B303C43E3B for ; Sun, 15 Sep 2002 05:39:37 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 4C8B23ABD49; Sun, 15 Sep 2002 14:43:50 +0200 (CEST) Date: Sun, 15 Sep 2002 14:43:50 +0200 From: Pawel Jakub Dawidek To: Julian Elischer Cc: freebsd-hackers@freebsd.org Subject: Re: Changing process informations. Message-ID: <20020915124350.GV68652@garage.freebsd.pl> References: <20020915114935.GU68652@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="m1rwLFmcefDs/2Y3" Content-Disposition: inline In-Reply-To: X-PGP-Key-URL: http://garage.freebsd.pl/jules.pgp X-OS: FreeBSD 4.6-STABLE i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --m1rwLFmcefDs/2Y3 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 15, 2002 at 05:04:01AM -0700, Julian Elischer wrote: +> if this is being done on -current then it occurs to me that you may be +> aboe to make use of: +> 1/ the MAC stuff rob watson is doing +> 2/ teh extended atribute stuff being done, where a=20 +> program can store a lot of meta data with itself (like a MACOS data +> fork) including possible the ruleset for itself. Port on -CURRENT will be done when -STABLE version will be finished:S +> Very cool.. +> do you have a writup of cerb-ng? cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/cerber co cerb-ng But there is no documentation in english avaliable for now. And there is no userland parser yet, but kernel part of code is almost complete. --=20 Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. --m1rwLFmcefDs/2Y3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPYSAhj/PhmMH/Mf1AQEuCwP9Emu1NULNp13+OQqCGhIGLMuPw2Zlvszo GLKhO4KEMkFd080MsrQqaPh/KRLOcjwFNhYOM3YCAiHTlbk4/zytyx1rp5sMJkGr hhA4b1Nquq5lYaLhYTyNtIObRz2x8O7lMir2V4+4Lo8XxbJGHYC4v8kuSsLr8yyL MiPBJkxj7T8= =DGFa -----END PGP SIGNATURE----- --m1rwLFmcefDs/2Y3-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 6:36:33 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB34B37B400 for ; Sun, 15 Sep 2002 06:36:31 -0700 (PDT) Received: from sirppi.helsinki.fi (sirppi.helsinki.fi [128.214.205.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE29043E4A for ; Sun, 15 Sep 2002 06:36:30 -0700 (PDT) (envelope-from akoskine@cc.helsinki.fi) Received: from localhost (akoskine@localhost) by sirppi.helsinki.fi (8.11.6/8.11.4) with ESMTP id g8FDaPD07661; Sun, 15 Sep 2002 16:36:25 +0300 (EET DST) X-Authentication-Warning: sirppi.helsinki.fi: akoskine owned process doing -bs Date: Sun, 15 Sep 2002 16:36:25 +0300 (EET DST) From: Aaro J Koskinen To: =?iso-8859-15?Q?Aur=E9lien?= Nephtali Cc: Sean Hamilton , Subject: Re: dmesg circular buffer In-Reply-To: <20020915093852.GA3645@nebula.wanadoo.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 15 Sep 2002, [iso-8859-15] Aurlien Nephtali wrote: > It seems that on some machines, while rebooting, the memory > where the kernel message buffer is stored, is not cleaned (on my laptop > it's the case). > > If your computer has this *bug*, doing 'dmesg' will display all > messages since you powered on you computer. [...] > PS: when i say 'memory problem', I don't really know if it's deliberate or not > but I think it's not :p It's not a bug. FreeBSD implements reboot by just reseting the CPU, not the whole system. BIOS should not clear or test the memory in this case. Sometimes it's desirable to leave memory as is. Unfortunately, not all BIOS manufacturers agree with this. A. -- Aaro Koskinen E-mail: aaro@iki.fi "I'm the ocean, I'm the giant undertow." http://www.iki.fi/aaro To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 7:31:33 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A423337B400 for ; Sun, 15 Sep 2002 07:31:32 -0700 (PDT) Received: from terra.inf.ufsc.br (terra.inf.ufsc.br [150.162.60.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D77A43E6A for ; Sun, 15 Sep 2002 07:31:30 -0700 (PDT) (envelope-from maianeto@inf.ufsc.br) Received: from localhost (localhost [127.0.0.1]) by terra.inf.ufsc.br (Departamento de Informatica e Estatistica (INE/CTC/UFSC)) with ESMTP id 6CF66178F7 for ; Sun, 15 Sep 2002 08:42:02 -0300 (BRT) Received: from screammer (inf185.inf.ufsc.br [150.162.60.185]) by terra.inf.ufsc.br (Departamento de Informatica e Estatistica (INE/CTC/UFSC)) with ESMTP id 377A517401 for ; Sun, 15 Sep 2002 08:41:56 -0300 (BRT) From: "Luiz Rodrigues Maia Neto" To: freebsd-hackers@freebsd.org Date: Mon, 15 Sep 2003 11:45:15 -0300 MIME-Version: 1.0 Subject: subscribe Reply-To: maianeto@inf.ufsc.br Message-ID: <3F65A64B.24613.9086F83@localhost> X-mailer: Pegasus Mail for Windows (v4.01) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by AMaViS 0.3.12pre5 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG subscribe maianeto@inf.ufsc.br To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 8:58:58 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B073237B40A for ; Sun, 15 Sep 2002 08:58:54 -0700 (PDT) Received: from logger.o2.pl (logger.o2.pl [212.126.20.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id E241F43E8A for ; Sun, 15 Sep 2002 08:58:52 -0700 (PDT) (envelope-from gfege@o2.pl) Received: from localhost (unknown [62.233.167.10]) by logger.o2.pl (Mailer_v2.01) with ESMTP id AC8491C41CB for ; Sun, 15 Sep 2002 17:58:51 +0200 (CEST) X-Sender: gfege@o2.pl From: gfege@o2.pl To: freebsd-hackers@FreeBSD.org Date: Sun, 15 Sep 2002 17:59:06 +0200 Subject: filmy divixy !!! Reply-To: gfege@o2.pl MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1250 Content-Transfer-Encoding: 8bit Message-Id: <20020915155851.AC8491C41CB@logger.o2.pl> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG DIVIXY : http://www.geocities.com/rekrutacja35/index.html Jeli nie ma w spisie na stronie filmw ktre Ci interesuj nic nie szkodzi! Mona je zamwi mailem w przecigu 7 dni roboczych zostanie dostarczona przesyka !!! Wypalam take pytki audio z twoj ulubion muzyk !!! 10 z za pytk patne z gry. Wysyka listem expres taniej i szybciej ! If you do not find the movie you are interested in, do not worry !! Send me an email and during 7 business days I will get a a package with the required movie !!! U want to have ur favourite music on CD let me know by email ! 10 PLN per CD. Shipment thru regular email. Faster and cheaper ! Zainteresowany usugami tumaczenia ? 1500 znakw 16 z. Niemiecki Angielski R u interested in translation services ? 1500 characters 16 PLN. German English. info : tradeinfo@o2.pl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 9:17:21 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD56837B400 for ; Sun, 15 Sep 2002 09:17:18 -0700 (PDT) Received: from flamingo.mail.pas.earthlink.net (flamingo.mail.pas.earthlink.net [207.217.120.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DEC743E42 for ; Sun, 15 Sep 2002 09:17:18 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0350.cvx40-bradley.dialup.earthlink.net ([216.244.43.95] helo=mindspring.com) by flamingo.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17qc4r-0000HU-00; Sun, 15 Sep 2002 09:16:54 -0700 Message-ID: <3D84B235.D6E671D6@mindspring.com> Date: Sun, 15 Sep 2002 09:15:49 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Valentin Nechayev Cc: Jev , hackers@FreeBSD.ORG Subject: Re: gethostbyname_r() fbsd equiv? References: <20020913145830.GB41842@ecad.org> <3D820700.DB53B0F9@mindspring.com> <20020913160214.GB42538@ecad.org> <3D820DD0.985F9C66@mindspring.com> <20020915111422.GA1077@iv.nn.kiev.ua> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Valentin Nechayev wrote: > SUSv3 doesn't know any gethostbyname_r. One can select either HP-UX/AIX > or Solaris/Linux version of interface, but the more correct way is possibly > to inplement getaddrinfo() in thread-safe way. getaddrinfo() is known > even for Microsoft (latest versions). I think you missed earlier, where I pointed out that AIX and HP/UX now use thread local storage versions of the functions, so that their external interface is unchanged. For FreeBSD to do this, people would need to permit two changes; the first would be to erase some of the distinction between the C++ startup code (i.e. c++rt0.c) and the C version. Specifically, the .init section can be replaces, but is not itself treated as a linker set by the compiler. The C++ code that does the constructor initialization for stacically initialized constructors and pure virtual base classes *is* a linker set. What this basically means is that rather than overloading the .init (which is not allowed -- you may only override it), the ability to set up thread local storage code requires that you implement in the constructor linker set space. This, in turn, means that C programs that want to do this automatically, without needing a magic function or a "static int once = 1;" thing must be linked against the C++ code that understands the constructors. The other change that is necessary is that the void argument functions require passing of the address of argc (really, they should pass the address of the kframe structure, but since argc is the first value, passing it's address is the same thing as passing the address of the kframe struct itself). See:" /usr/src/lib/csu/i386/crt0.c for more enightenment. I have code that, if this is done, permits the implementation of the code we have been talking about. In an absolutely ideal world, there would be linker-setted "thread attach" and "thread detach" methods, which would be required to be called on pthread creation and destruction, so that it was possible to do resource tracking precreation and cleanup of thread local storage areas for any call that needed this type of thing. > For now I can't understand why thread-safe resolver from BIND >= 8.2 wasn't > imported. For applications where it is nesessary (e.g. milter filter with > extended checking of sender validity), we had to compile libbind and link > it in non-natural way.;( getaddrinfo/getnameinfo can be rewritten for > thread-safe resolver mechanically, without advanced thinking. > > P.S. BIND source has version of gethostbyaddr_r and only it should be > named as canonical. The BIND code wasn't imported for two reasons: 1) The resolver in FreeBSD is not in a separate library, it is in libc, so it is hard to track modifications to the resolver without introducing a proliferation of version numbers for the C library. This isn't easily correctable, since: a) The resolver is assumed to be part of the C library for most code b) There are programs which assume the resolver is there, which are themselves statically linked. While ELF supports linking one shared library against another, which would hid the dependency of a libc on a libresolv and allow transparent migration, the antique static linking does not support library dependencies in ELF, so all of these statically linked programs compilation would have to be changed 2) The resolver library in FreeBSD has been substantially modified by the KAME IPv6 code being imported into FreeBSD. This code substantially predates the "BIND >= 8.2" support for IPv6, which you are referencing. Probably the canonically correct thing to do would be to move the resolver out of libc. Doing this brings out such amazing opposition that it's like trying to build a new freeway, and having the residents whose houses will have to be torn down insist on being able to use their houses until you cut the ribbon on the freeway itself. If you want to pursue moving the resolver out of libc, I'll add my voice in support of the idea. However, I don't expect that you will be very successful in implementing this idea incrementally, the way everyone will demand that it be implemented, so that it doesn't impact them (after all, why do they need these extra features?). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 9:47:18 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 430DD37B400 for ; Sun, 15 Sep 2002 09:47:16 -0700 (PDT) Received: from segfault.kiev.ua (segfault.kiev.ua [193.193.193.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 398E543E4A for ; Sun, 15 Sep 2002 09:47:14 -0700 (PDT) (envelope-from netch@iv.nn.kiev.ua) Received: (from uucp@localhost) by segfault.kiev.ua (8) with UUCP id TSA35539; Sun, 15 Sep 2002 19:46:51 +0300 (EEST) (envelope-from netch@iv.nn.kiev.ua) Received: (from netch@localhost) by iv.nn.kiev.ua (8.12.3/8.12.3) id g8FGhta9002859; Sun, 15 Sep 2002 19:43:55 +0300 (EEST) (envelope-from netch) Date: Sun, 15 Sep 2002 19:43:55 +0300 From: Valentin Nechayev To: Terry Lambert Cc: Jev , hackers@FreeBSD.ORG Subject: Re: gethostbyname_r() fbsd equiv? Message-ID: <20020915164354.GA275@iv.nn.kiev.ua> References: <20020913145830.GB41842@ecad.org> <3D820700.DB53B0F9@mindspring.com> <20020913160214.GB42538@ecad.org> <3D820DD0.985F9C66@mindspring.com> <20020915111422.GA1077@iv.nn.kiev.ua> <3D84B235.D6E671D6@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D84B235.D6E671D6@mindspring.com> X-42: On Organization: Dark side of coredump Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Sun, Sep 15, 2002 at 09:15:49, tlambert2 (Terry Lambert) wrote about "Re: gethostbyname_r() fbsd equiv?": >> SUSv3 doesn't know any gethostbyname_r. One can select either HP-UX/AIX >> or Solaris/Linux version of interface, but the more correct way is possibly >> to inplement getaddrinfo() in thread-safe way. getaddrinfo() is known >> even for Microsoft (latest versions). TL> I think you missed earlier, where I pointed out that AIX and HP/UX TL> now use thread local storage versions of the functions, so that their TL> external interface is unchanged. I didn't missed it. But I think that any interface which directly reflects multithread environment is rather preferrable than interface which relies on thread-local storage crutch. Of course, in Unix, where each little syscall requires TLS to deal with errno, this isn't already important:( Of course, old-style interface, which can be thread-safely implemented only with TLS, should exist and be safe. But only interface which directly deals with buffers should be announced as preferrable. This is useful even for code clarity. This is why I told about gethostbyname_r. gethostbyname (old) is question of real implementation, not calling convention. TL> For FreeBSD to do this, people would need to permit two changes; TL> the first would be to erase some of the distinction between the TL> C++ startup code (i.e. c++rt0.c) and the C version. This is long and hard way. Importing of thread-safe resolver, which has now interface without implicit TLS using, and netdb interface without implicit TLS using is much easier and will allow parallel usage effectively immediately. If code is already using multithreading, which means wide use of multithreading special functions, it isn't hard to use thread-safe netdb/resolver functions. TL> Specifically, the .init section can be replaces, but is not itself [...] I won't discuss this stuff because I don't know it, totally. This wasn't object of my previous replic. TL> The BIND code wasn't imported for two reasons: TL> 1) The resolver in FreeBSD is not in a separate library, it is TL> in libc, so it is hard to track modifications to the resolver TL> without introducing a proliferation of version numbers for the TL> C library. This isn't easily correctable, since: TL> a) The resolver is assumed to be part of the C library TL> for most code All this isn't a reason not to do one carefully controlled merging of resolver code from more-less new version. I ain't say nothing on automatic usage of this code, it's isn't in local tradition in any way. OTOH it's possible to make separate libresolv which contains newer code. TL> 2) The resolver library in FreeBSD has been substantially modified TL> by the KAME IPv6 code being imported into FreeBSD. This code TL> substantially predates the "BIND >= 8.2" support for IPv6, which TL> you are referencing. This is another factor which can be considered as real. (It is not factor for me because I think IPv6 is dead-born and will repeat history of X.25 and other committee-designed products. But you can think different.) TL> If you want to pursue moving the resolver out of libc, No. :) /netch To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 9:55:27 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 449ED37B400 for ; Sun, 15 Sep 2002 09:55:22 -0700 (PDT) Received: from smtp01.01.246.ne.jp (smtp01.01.246.ne.jp [210.253.192.39]) by mx1.FreeBSD.org (Postfix) with SMTP id 098BA43E3B for ; Sun, 15 Sep 2002 09:55:21 -0700 (PDT) (envelope-from jir@01.246.ne.jp) Received: (qmail 27706 invoked by alias); 16 Sep 2002 01:55:10 +0900 Received: (qmail 27592 invoked from network); 16 Sep 2002 01:55:07 +0900 Received: from unknown (HELO mebius2) (210.253.214.147) by tp01001 with SMTP; 16 Sep 2002 01:55:07 +0900 Message-ID: <063201c25cd7$b033bd20$0201a8c0@mebius2> From: "jir" To: , , , "=?iso-2022-jp?B?GyRCQCQzJjtxS1wbKEI=?=" , Cc: , , , , , , , References: <20020915140810.5842.qmail@web305.mail.yahoo.co.jp> Subject: =?iso-2022-jp?B?UmU6IFtnZW5wYXRzdTowMTA1XSBSZTogRnc6IFthcmd1ZTo2NDY=?= =?iso-2022-jp?B?N10gUmU6IBskQiRJJCYkNyRGRjtPKSQsOXExRCRHJEokLSRjJEobKEI=?= =?iso-2022-jp?B?GyRCJGkkcyROJEckOSQrISkbKEI=?= Date: Mon, 16 Sep 2002 01:48:13 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ++++++++++=1B$B!!Ej9F@h!!=1B(Bkankokkyusyuaqua@freeml.com=1B$B!!=1B(B++++= +++++ =1B$BF|K\$N#G#D#P$r$"$2$k$K$O!"=1B(B =1B$B4Z9q6e=3D#%"%/%"%i%$%s$N7z@_=1B(B http://www.iijnet.or.jp/IHCC/mk.html =1B$BJF73#73$>e4pCO$N7z@_=1B(B =1B$B@$3$NIO:$F;O);v>p$NF|K\=1B(B =1B$B@8;:6H$N:F@8$3$=3DF|K\$NI|3h=1B(B =1B$B<:6H<+;&CO$O$"$k$G$7$g$&!#=1B(B : =1B$B7rA4$J:b@/$KLa$C$?$H$-$K$b$&0lEY9M$(D>$7$?$[$&$,=1B(B : =1B$B8-L@$H9M$($^$9!#=1B(B =1B$B9q2H$N%P%i%s%9%7!<%H$O@V;z9q:D$@$1$G$O$J$$$N$G$9!#=1B(B : > = =1B$B9qL1@$O@$,=3D06r$+$i1Q:M$KJQ?H!$,F|6d$X;X<(=1B= (B : > =1B$BF|6d?77tH/9T#G#D#PBPHf#3A}$7$NA}2CJ,! =1B$B6d9T$,9q:D$rF|6d$+$i =1B$B9qFb$NDL2_5[$$>e$2!J%G%U%l!K@/I\@V;z9q:DA}2C!)=1B(B :=20 : > =1B$BF|6d?77tH/9T#G#D#PBPHf#3A}$7$NA}2CJ,! =1B$B6d9T$,9q:D$rF|6d$+$io$NF;O)8x6&Ej;q =1B$B9qFb$NDL2_5[$$>e$2!J%G%U%l!K@/I\@V;z9q:DA}2C!)=1B(B : =1B$B>e$N =1B$B6d9T$,9q:D$rF|6d$+$i$G9q:D$r9XF~!JDL2_0\F0!K=1B(B =1B$BF;O)8xCD$,9q$NJQ$o$j$K%a%s%F$d?75,$KF;O)$r7z@_2q4k6H$XDL2_0\F0!#=1B(B =1B$B$G=1B(B : > = =1B$B! = =1B$B3t>e>:!Z7t2qe>:! =1B$B! =1B$BJF9q@oAh$r;_$a$k!#=1B(B =1B$B$G$9!#=1B(B =1B$B$3$l$G6d9T$K9q:D$NIi:D$H?75,DL2_$,;D$j$^$9!#=1B(B =1B$B9q2H$K$O@V;z9q:D$,;D$j$^$9!#=1B(B =1B$B$G$b6d9T$,Ii:D$rF|6d$KJ'$$!"F|6d$,FCM;$G9q2H$K$*6b$r=3DP$9$H!#=1B(B =1B$B$=3D$l$O!"9q2H$,302_$rGc$$$^$9!JF|6dBe9T!K!"$3$l$GF|K\4OBb$O=1B(B =1B$B@$3&$+$i6b$r2T$.$^$9!"Bg9u;z!"9q2HGK;:$H$OL51o$NF|K\$,CB@8$G$9!#=1B(= B =1B$BF|6d!J9q2H!K$O!"8D?M8~$19q:D$rH/9T$9$kM=3DDj$G$9!#=1B(B =1B$B:#$^$G$J$+$C$?!)=3DnL1$OCN$C$F$$$?$N$+!)=1B(B =1B$BF|6d!J9q2H!K$K7l@G$G@V;z9q:D$rJV$9$N$OB9;R$NBe$^$GBgJQ!)=1B(B =1B$B$=3D$s$J$K9q2H!JF|6d!K$O@G6b$GJV:Q$7$F$b$i$o$J$/$F$b$@$$%8%g%V$h!#=1B= (B =1B$BJF9q:D$bGc$C$?$7!#=1B(B : = =1B$BF|6d$O;TCf$+$i9q:D$rGc$C$F%^%M!<%U%m!<$rA}2C$7$h$&$H$7$F$$$k$N$G=1B(= B : =1B$B6d9T$,9q:D$rF|6d$+$i = =1B$B! = =1B$B3t>e>:!Z7t2qe>:! =1B$B! =1B$BJF9q@oAh$r;_$a$k!#=1B(B : > =1B$BF;O)8xCD$,%<%M%3%s$KH/Cm!.9)L3E9H/Cm=1B(B : =1B$BF;O)8xCD$Oe$NO@M};2>H!K$G$d$j$/$j=1B(B =1B$B%7%F%k$N$G$9$h!#=1B(B : =1B$BF;O)8xCD$O!"DL9TNA$,M=3DA[30$K>/$J$/$FGK;:!#=1B(B =1B$BF;O)8xCD$KF~$kDL9TNA$O8xCD?&0w$,$_$s$J$b$i$$$^$9!#=1B(B =1B$BGK;:$H$OF;O)$J$I;q;:$,F;O)8xCDL>5A$GEP5-$5$l$F$$$F=1B(B =1B$B$=3D$l$rGd$C$F$bIi:D$,J'$($J$$>l9g$G!"$b$H$b$HIi:D$O#0$G=1B(B =1B$B7PHq$O9q$,$9=1B(B=1B$B$Y$FJ'$&$N$G$9!#=1B(B : > = =1B$B9qL1@$O@$,=3D06r$+$i1Q:M$KJQ?H!$,F|6d$X;X<(=1B= (B : > =1B$BF|6d?77tH/9T#G#D#PBPHf#3A}$7$NA}2CJ,! =1B$B6d9T$,9q:D$rF|6d$+$i =1B$B9qFb$NDL2_5[$$>e$2!J%G%U%l!K@/I\@V;z9q:DA}2C!)=1B(B :=20 : > =1B$BF|6d?77tH/9T#G#D#PBPHf#3A}$7$NA}2CJ,! Http://aladdin.cool.Ne.Jp/pc/toukei=1B$B!!!!$r%/%j%C%/=1B(B :=20 : =1B$B%/%j%C%/$7$?$i0YBX%l!<%H$,=3DP$F$-$^$7$?!#=1B(B =1B$B3F%7!<%H$NL@:Y$G$9!#=1B(B =1B$B6bM;7P:Q7nJs!J#9#9G/#17n!K!!;29M7WI=3D=1B(B =1B$B!J?^I=3D=1B(B =1B$B#1!K=1B(B =1B$B9qFbj46$H4k6H<}1W=1B(B =1B$B!J?^I=3D#1#0!K=1B(B =1B$B4k6H6bM;4XO";XI8=1B(B =1B$B!J?^I=3D#1#1!K=1B(B =1B$B8D?M>CHq4XO";XI8=1B(B =1B$B!J?^I=3D#1#2!K=1B(B =1B$B>CHqCHq@-8~=1B(B =1B$B!J?^I=3D#1#3!K=1B(B =1B$B?7@_=3D;BpCe9)8M?t=1B(B =1B$B!J?^I=3D#1#4!K=1B(B =1B$B9[9)6H@8;:!&=3DP2Y!&:_8K=1B(B =1B$B!J?^I=3D#1#5!K=1B(B =1B$B:_8K=3D[4D=1B(B =1B$B!J?^I=3D#1#6!K=1B(B =1B$BO+F/<{5k=1B(B =1B$B!J?^I=3D#1#7!K=1B(B =1B$B4k6H$N8[MQ7W2h=1B(B =1B$B!J?^I=3D#1#8!K=1B(B =1B$B8[MQCHql6bMxEy=1B(B =1B$B!J?^I=3D#2#4!K=1B(B =1B$BC;4|6bM;;T>l=1B(B =1B$B!J?^I=3D#2#5!K=1B(B =1B$B%f!<%m1_6bMx@hJ*!J#3$+7n!K=1B(B =1B$B!J?^I=3D#2#6!K=1B(B =1B$B%8%c%Q%s!&%W%l%_%"%`=1B(B =1B$B!J?^I=3D#2#7!K=1B(B =1B$BD94|6bMx$N4|4VJLJ,2r=1B(B =1B$B!J?^I=3D#2#8!K=1B(B =1B$B6bM;:DN.DLMx2s$j=1B(B =1B$B!J?^I=3D#2#9!K=1B(B =1B$B.4k6H$+$i$_$?6bM;5!4X$NB_=3DPBVEY=1B(B =1B$B!J?^I=3D#3#6!K=1B(B =1B$B;qK\;T>lD4C#=1B(B =1B$B!J?^I=3D#3#7!K=1B(B =1B$B$=3D$NB>6bM;5!4XB_=3DP=1B(B =1B$B!J?^I=3D#3#8!K=1B(B =1B$BB_=3DP6bMx=1B(B =1B$B!J?^I=3D#3#9!K=1B(B =1B$B4k6HE];:=1B(B To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 13:16:12 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 602DF37B400 for ; Sun, 15 Sep 2002 13:16:11 -0700 (PDT) Received: from newnet.co.uk (newnet.co.uk [212.87.80.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 709E743E4A for ; Sun, 15 Sep 2002 13:16:10 -0700 (PDT) (envelope-from jamie@jamiesdomain.org.uk) Received: from BONG (unknown@jheckford-131.adsl.newnet.co.uk [213.131.191.131]) by newnet.co.uk (8.12.3/8.12.3) with SMTP id g8FKG6NE050318 for ; Sun, 15 Sep 2002 21:16:06 +0100 (BST) (envelope-from jamie@jamiesdomain.org.uk) Message-ID: <001001c25d36$a3672be0$83bf83d5@BONG> Reply-To: "Jamie Heckford" From: "Jamie Heckford" To: Subject: Kernel - Modules and Compiled in Date: Sun, 15 Sep 2002 21:07:56 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Newnet-MailScanner: Found to be clean Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I've noticed by having to admin a few linux boxes in my time that the majority of the kernel drivers are loaded via modules, comparing this to freebsd it seems to be that most drivers are compiled into the kernel and utilities such as ipfw/linux emu. are loaded as modules. I was wondering what the advantages/disadvantages are of using kernel modules as opposed to compiling them in? If someone could kindly let me know or shout where theres an in-depth explanation on the net I would be grateful :) Cheers, -- Jamie Heckford jamie@jamiesdomain.org.uk http://www.jamiesdomain.org.uk/ FreeBSD: The Power to Serve -- ____________________________________________________ Message scanned for viruses and dangerous content by and believed to be clean To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 13:37:51 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 744F337B400 for ; Sun, 15 Sep 2002 13:37:49 -0700 (PDT) Received: from host217-39-97-162.in-addr.btopenworld.com (host217-39-97-162.in-addr.btopenworld.com [217.39.97.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id E163643E65 for ; Sun, 15 Sep 2002 13:37:48 -0700 (PDT) (envelope-from dom@host217-39-97-162.in-addr.btopenworld.com) Received: by host217-39-97-162.in-addr.btopenworld.com (Postfix, from userid 1001) id 318862A6; Sun, 15 Sep 2002 21:38:36 +0100 (BST) Date: Sun, 15 Sep 2002 21:38:35 +0100 From: Dominic Marks To: Jamie Heckford Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel - Modules and Compiled in Message-ID: <20020915203835.GA3497@gallium> References: <001001c25d36$a3672be0$83bf83d5@BONG> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001001c25d36$a3672be0$83bf83d5@BONG> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Sep 15, 2002 at 09:07:56PM -0700, Jamie Heckford wrote: > Hi, > > I've noticed by having to admin a few linux boxes in my time that the majority of the kernel > drivers are loaded via modules, comparing this to freebsd it seems to be that most drivers > are compiled into the kernel and utilities such as ipfw/linux emu. are loaded as modules. > > I was wondering what the advantages/disadvantages are of using kernel modules as opposed to > compiling them in? advantages: you can update a module without rebooting a machine, if a bug was fixed in say the msdos filesystem module you could compile it, unload the existing module and load the newer version. vendors can distribute a binary module if they cant, or dont wish to release the source. lots of others. disadvantages: some drivers need to be able to allocate a large chunk of contiguous memory to operate correctly, this means some drivers cant work when not compiled in to the kernel (because they dont get their request for a block of memory in early enough). I was thinking about this recently, perhaps if the kernel allocated a chunk of memory early on in the boot process (amount configurable via sysctl) then this could be chopped up and handed to modules specifically, there is probably a good reason why this isnt possible (?) which has not occured to me, because it seems like the common sense solution. FreeBSD 5 will have many more things accessible via modules, a trend which is likely to continue. > If someone could kindly let me know or shout where theres an in-depth explanation on the net > I would be grateful :) > > Cheers, > > -- > Jamie Heckford > jamie@jamiesdomain.org.uk > http://www.jamiesdomain.org.uk/ > > FreeBSD: The Power to Serve > > -- > ____________________________________________________ > Message scanned for viruses and dangerous content by > and believed to be clean > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- Dominic Marks Computer & Politics Geek [educ]::[umist.ac.uk] << notyet-known at umist.ac.uk >> [home]::[btinternet] << dominic_marks at btinternet.com >> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 15:14:22 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A0A537B400 for ; Sun, 15 Sep 2002 15:14:20 -0700 (PDT) Received: from orthanc.ab.ca (orthanc.ab.ca [216.123.203.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0F1E43E6E for ; Sun, 15 Sep 2002 15:14:19 -0700 (PDT) (envelope-from lyndon@orthanc.ab.ca) Received: from orthanc.ab.ca (localhost.orthanc.ab.ca [127.0.0.1]) by orthanc.ab.ca (8.12.6/8.12.6) with ESMTP id g8FMEIsl078355 for ; Sun, 15 Sep 2002 16:14:18 -0600 (MDT) (envelope-from lyndon@orthanc.ab.ca) Message-Id: <200209152214.g8FMEIsl078355@orthanc.ab.ca> To: freebsd-hackers@freebsd.org Subject: Enhanced lastlogin(8) Organization: The Frobozz Magic Homing Pigeon Company X-Mailer: mh-e 6.1+cvs; MH 6.8.4; Emacs 21.2 Date: Sun, 15 Sep 2002 16:14:18 -0600 From: Lyndon Nerenberg Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've re-implemented lastlogin, adding a parsable output format that makes it easy to scan for stale accounts. The differences are described below. Since others might find this useful, I've put the code up at ftp://orthanc.ab.ca/lyndon/freebsd/usr.sbin/lastlogin/. (If anyone wants to commit this, feel free.) ----- This is a re-implementation of lastlogin. It differs from the version included with FreeBSD 4.6 in the following ways. (Note: FL == "FreeBSD 4.6 lastlogin") * FL directly accessed /etc/passwd. It couldn't deal with NIS accounts. This version uses the getpw*() API to access the password database. * This version doesn't use stdio to access the lastlog file. * This version doesn't sort the results by uid. If you actually rely on that behaviour I would like to hear from you. * New -a flag makes lastlogin print information for users who have never logged in. * New -n flag prints (only) the last login time, in seconds since the epoch. For example: root 1031358466 lyndon 1032115401 The two fields are tab seperated. This format is designed to be easily parsed by other programs. * FL always displayed the contents of pw_name for the user name. If the password database contained multiple records with the same uid and unique names, the output from FL might not match the input. Let's say your password database contains these records: lyndon:*:100:100::: bob:*:200:200::: fred:*:100:100::: the output from "lastlogin bob fred" might display: lyndon ttyp3 :0.0 Sun Sep 15 15:15:17 2002 bob ttyp0 example.com Mon Dec 11 01:30:03 2000 In this version, the name from the command line is printed instead of the contents of pw_name. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 20:14:25 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FEA137B400 for ; Sun, 15 Sep 2002 20:14:24 -0700 (PDT) Received: from www.radier.ca (dmitriyf.istop.com [66.199.181.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F6C443E72 for ; Sun, 15 Sep 2002 20:14:23 -0700 (PDT) (envelope-from dmitriy@radier.ca) Received: from laptop (laptop.radier.ca [192.168.0.20]) by www.radier.ca (8.11.3/8.11.3) with SMTP id g8G3EGE05062 for ; Sun, 15 Sep 2002 23:14:17 -0400 (EDT) (envelope-from dmitriy@radier.ca) From: "Dmitriy Fitisov" To: Subject: POSIX message queue Date: Sun, 15 Sep 2002 23:14:20 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Importance: Normal Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I cannot find implementation of POSIX message queues (mq_open, mq_xxx, ...). Even though there is a message header mqueue.h ld cannot find a library. Am I looking in wrong place? Thanks. Dmitriy Fitisov To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 20:39:34 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3015837B400 for ; Sun, 15 Sep 2002 20:39:34 -0700 (PDT) Received: from jive.SoftHome.net (jive.SoftHome.net [66.54.152.27]) by mx1.FreeBSD.org (Postfix) with SMTP id 8D88A43E65 for ; Sun, 15 Sep 2002 20:39:33 -0700 (PDT) (envelope-from int@softhome.net) Received: (qmail 28991 invoked by uid 417); 16 Sep 2002 03:39:33 -0000 Received: from shunt-smtp-out-0 (HELO softhome.net) (172.16.3.12) by shunt-smtp-out-0 with SMTP; 16 Sep 2002 03:39:33 -0000 Received: from int.homeunix.org ([218.58.82.222]) (AUTH: LOGIN int@softhome.net) by softhome.net with esmtp; Sun, 15 Sep 2002 21:39:30 -0600 Date: Mon, 16 Sep 2002 11:39:25 +0800 From: Leslie Jackson To: freebsd-hackers@freebsd.org Subject: [Please Ignore] Test Message-Id: <20020916113925.0928d660.int@softhome.net> X-Mailer: Sylpheed version 0.7.6 (GTK+ 1.2.10; i386-portbld-freebsd4.6) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Only for test To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 20:43:54 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 34C8437B400 for ; Sun, 15 Sep 2002 20:43:53 -0700 (PDT) Received: from jive.SoftHome.net (jive.SoftHome.net [66.54.152.27]) by mx1.FreeBSD.org (Postfix) with SMTP id AF57743E42 for ; Sun, 15 Sep 2002 20:43:52 -0700 (PDT) (envelope-from int@softhome.net) Received: (qmail 5852 invoked by uid 417); 16 Sep 2002 03:43:22 -0000 Received: from shunt-smtp-out-0 (HELO softhome.net) (172.16.3.12) by shunt-smtp-out-0 with SMTP; 16 Sep 2002 03:43:22 -0000 Received: from int.homeunix.org ([218.58.82.222]) (AUTH: LOGIN int@softhome.net) by softhome.net with esmtp; Sun, 15 Sep 2002 21:43:20 -0600 Date: Mon, 16 Sep 2002 11:43:15 +0800 From: Leslie Jackson To: freebsd-hackers@freebsd.org Subject: ioctl & SIOCDIFADDR Message-Id: <20020916114315.7feb4bac.int@softhome.net> X-Mailer: Sylpheed version 0.7.6 (GTK+ 1.2.10; i386-portbld-freebsd4.6) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I just want to use ioctl() to change IP address of a spcified interface. By using ktrace(and kdump), i've found that 'ifconfig' command first uses SIOCDIFADDR to delete an IP and then uses SIOCAIFADDR to make a aliase (this way a new IP is assigned). And from the man page of netintro: ------------------------------------------------------------------------------- SIOCDIFADDR: [sniped] and also adopts the convention that specification of the default address means to delete the first address for the interface belonging to the address family in which the original socket was opened. ------------------------------------------------------------------------------- I can specify an specific IP, say, "192.168.0.2", for SIOCDIFADDR to delete. But how can i specify this "default address"(said in the netintor(4)) to "delete the first address of the interface"? Thanks in advance. -- Leslie Jackson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 20:53:16 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6109537B400; Sun, 15 Sep 2002 20:53:05 -0700 (PDT) Received: from hotmail.com (f104.pav1.hotmail.com [64.4.31.104]) by mx1.FreeBSD.org (Postfix) with ESMTP id D373A43E81; Sun, 15 Sep 2002 20:53:04 -0700 (PDT) (envelope-from evantd@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 15 Sep 2002 20:52:42 -0700 Received: from 12.229.158.71 by pv1fd.pav1.hotmail.msn.com with HTTP; Mon, 16 Sep 2002 03:52:42 GMT X-Originating-IP: [12.229.158.71] From: "Evan Dower" To: matt@gsicomp.on.ca, freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org, freebsd-questions@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Printer (lpt0) Device Busy (Epson Stylus Color 740) Date: Sun, 15 Sep 2002 20:52:42 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 16 Sep 2002 03:52:42.0454 (UTC) FILETIME=[823D6760:01C25D34] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Has anyone even gotten an Epson Stylus Color 740 to work on FreeBSD 4.x? If so, I would love to get in touch with you. I can't seem to get mine to work regardless of BIOS settings. Thanks a lot, Evan Dower >From: "Matthew Emmerton" >To: "Evan Dower" >Subject: Re: Printer (lpt0) Device Busy >Date: Sat, 14 Sep 2002 18:13:57 -0400 >MIME-Version: 1.0 >Received: from tomts22-srv.bellnexxia.net ([209.226.175.184]) by >hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Sat, 14 Sep 2002 >15:14:00 -0700 >Received: from xena.gsicomp.on.ca ([65.95.177.86]) by >tomts22-srv.bellnexxia.net (InterMail vM.5.01.04.19 >201-253-122-122-119-20020516) with ESMTP id ><20020914221357.LVJT15700.tomts22-srv.bellnexxia.net@xena.gsicomp.on.ca> > for ; Sat, 14 Sep 2002 18:13:57 -0400 >Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18])by >xena.gsicomp.on.ca (8.11.3/8.11.3) with SMTP id g8EL08X95409for >; Sat, 14 Sep 2002 17:00:08 -0400 (EDT)(envelope-from >matt@gsicomp.on.ca) >Message-ID: <015301c25c3c$05d36b50$1200a8c0@gsicomp.on.ca> >References: >X-Priority: 3 >X-MSMail-Priority: Normal >X-Mailer: Microsoft Outlook Express 5.50.4807.1700 >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 >Return-Path: matt@gsicomp.on.ca >X-OriginalArrivalTime: 14 Sep 2002 22:14:00.0302 (UTC) >FILETIME=[06E158E0:01C25C3C] > >Evan, > >If you've used it this way before with other OSes, then it's most likely a >FreeBSD problem. > >I've had problems with some printer when running with EPP/ECP enabled in >the >BIOS. I'd try adjusting your BIOS to make your printer port "dumb" and see >if that makes things better. > >Matt > > >----- Original Message ----- >From: "Evan Dower" >To: >Sent: Saturday, September 14, 2002 4:51 PM >Subject: Re: Printer (lpt0) Device Busy > > > > Hmm... I have used it only with MacOS (not X) and Linux, and according >to > > http://www.linuxprinting.org/show_printer.cgi?recnum=62112 "Printer >supports > > direct text printing with the `us-ascii' charset." Whether it requires >some > > initial setup I don't know, though it is (very specifically) detected at > > startup. Do you know how I could check on that? or what I can do if that >is > > the case? > > Thanks, > > Evan Dower > > > > > > >From: "Matthew Emmerton" > > >To: "Evan Dower" > > >Subject: Re: Printer (lpt0) Device Busy > > >Date: Sat, 14 Sep 2002 00:09:48 -0400 > > >MIME-Version: 1.0 > > >Received: from tomts22-srv.bellnexxia.net ([209.226.175.184]) by > > >mc2-f35.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Fri, >13 > > >Sep 2002 21:09:52 -0700 > > >Received: from xena.gsicomp.on.ca ([65.95.177.86]) by > > >tomts22-srv.bellnexxia.net (InterMail vM.5.01.04.19 > > >201-253-122-122-119-20020516) with ESMTP id > > > ><20020914040948.SZOF15700.tomts22-srv.bellnexxia.net@xena.gsicomp.on.ca> > > > for ; Sat, 14 Sep 2002 00:09:48 -0400 > > >Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18])by > > >xena.gsicomp.on.ca (8.11.3/8.11.3) with SMTP id g8E2twX94177for > > >; Fri, 13 Sep 2002 22:55:58 -0400 >(EDT)(envelope-from > > >matt@gsicomp.on.ca) > > >Message-ID: <001501c25ba4$91145c30$1200a8c0@gsicomp.on.ca> > > >References: > > >X-Priority: 3 > > >X-MSMail-Priority: Normal > > >X-Mailer: Microsoft Outlook Express 5.50.4807.1700 > > >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 > > >Return-Path: matt@gsicomp.on.ca > > >X-OriginalArrivalTime: 14 Sep 2002 04:09:54.0043 (UTC) > > >FILETIME=[9449E4B0:01C25BA4] > > > > > > > I am trying to install a printer (Epson Stylus Color 740), but >FreeBSD > > > > claims that the device (/dev/lpt0) is busy. I began with 4.6-RELEASE >but > > > > upgrade to -STABLE to see if that would fix the problem (it didn't). >My > > > > system is: > > > > $ uname -a > > > > FreeBSD lojak.u.washington.edu 4.7-PRERELEASE FreeBSD 4.7-PRERELEASE >#0: > > >Thu > > > > Sep 12 00:21:06 PDT 2002 > > > > root@lojak.u.washington.edu:/usr/obj/usr/src/sys/CUSTOM i386 > > > > I even tried using the GENERIC kernel to no avail. I'm fairly >certain >my > > > > kernel is set up properly anyway since the printer is detected at > > >startup. > > > > $ dmesg > > > > ... > > > > ppc0: at port 0x378-0x37f irq 7 on isa0 > > > > ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode > > > > ppc0: FIFO with 16/16/9 bytes threshold > > > > ppbus0: IEEE1284 device found /NIBBLE > > > > Probing for PnP devices on ppbus0: > > > > ppbus0: PRINTER ESCPL2,BDC,D4 > > > > lpt0: on ppbus0 > > > > lpt0: Interrupt-driven port > > > > ... > > > > Yet still, if I try to do a test print, nothing happens. > > > > # echo test > /dev/lpt0 > > > > /dev/lpt0: Device busy. > > > > In fact, even just trying to get status info does the same thing. > > > > # cat /dev/lpt0 > > > > cat: /dev/lpt0: Device busy > > > > So the device is busy. Certainly, a program must be bogarting it. >Yet > > >fstat > > > > begs to differ. > > > > $ fstat /dev/lpt0 > > > > USER CMD PID FD MOUNT INUM MODE SZ|DV >R/W > > >NAME > > > > That's an empty list of open files named /dev/lpt0. > > > > > >If your Epson print is a "winprinter" (meaning that it requires special > > >initialization before it will allow itself to print plain text), then >the > > >device will show up as busy if you try and do anything with it. > > > > > >-- > > >Matt Emmerton > > > > > > > > > > _________________________________________________________________ > > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > > _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 22: 6:54 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6432D37B400; Sun, 15 Sep 2002 22:06:45 -0700 (PDT) Received: from server.home.neal.nelson.name (CPE-203-51-147-163.vic.bigpond.net.au [203.51.147.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55DAC43E42; Sun, 15 Sep 2002 22:06:43 -0700 (PDT) (envelope-from neal@nelson.name) Received: from server.home.neal.nelson.name (localhost [127.0.0.1]) by server.home.neal.nelson.name (8.12.6/8.12.5) with ESMTP id g8G5Cicc000370; Mon, 16 Sep 2002 15:12:45 +1000 (EST) (envelope-from neal@nelson.name) Date: Mon, 16 Sep 2002 15:12:44 +1000 From: Neal Nelson To: Evan Dower Cc: matt@gsicomp.on.ca, freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org, freebsd-questions@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Printer (lpt0) Device Busy (Epson Stylus Color 740) Message-ID: <20020916051244.GA351@server> Reply-To: neal@nelson.name References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: ; from evantd@hotmail.com on Mon, Sep 16, 2002 at 13:52:42 +1000 X-Mailer: Balsa 1.4.0 Lines: 185 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've been using an Epson Stylus Color 740 on FreeBSD for ages without problems. However, I'm using the USB interface not parallel with CUPS as my print system. Probably of no help apart from that fact that it can be made to work. On 2002.09.16 13:52 Evan Dower wrote: > Has anyone even gotten an Epson Stylus Color 740 to work on FreeBSD > 4.x? If so, I would love to get in touch with you. I can't seem to > get mine to work regardless of BIOS settings. > Thanks a lot, > Evan Dower > > >> From: "Matthew Emmerton" >> To: "Evan Dower" >> Subject: Re: Printer (lpt0) Device Busy >> Date: Sat, 14 Sep 2002 18:13:57 -0400 >> MIME-Version: 1.0 >> Received: from tomts22-srv.bellnexxia.net ([209.226.175.184]) by >> hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Sat, 14 Sep 2002 >> 15:14:00 -0700 >> Received: from xena.gsicomp.on.ca ([65.95.177.86]) by >> tomts22-srv.bellnexxia.net (InterMail vM.5.01.04.19 >> 201-253-122-122-119-20020516) with ESMTP id >> <20020914221357.LVJT15700.tomts22-srv.bellnexxia.net@xena.gsicomp.on.ca> >> for ; Sat, 14 Sep 2002 18:13:57 -0400 >> Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18])by >> xena.gsicomp.on.ca (8.11.3/8.11.3) with SMTP id g8EL08X95409for >> ; Sat, 14 Sep 2002 17:00:08 -0400 >> (EDT)(envelope-from matt@gsicomp.on.ca) >> Message-ID: <015301c25c3c$05d36b50$1200a8c0@gsicomp.on.ca> >> References: >> X-Priority: 3 >> X-MSMail-Priority: Normal >> X-Mailer: Microsoft Outlook Express 5.50.4807.1700 >> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 >> Return-Path: matt@gsicomp.on.ca >> X-OriginalArrivalTime: 14 Sep 2002 22:14:00.0302 (UTC) >> FILETIME=[06E158E0:01C25C3C] >> >> Evan, >> >> If you've used it this way before with other OSes, then it's most >> likely a >> FreeBSD problem. >> >> I've had problems with some printer when running with EPP/ECP >> enabled in the >> BIOS. I'd try adjusting your BIOS to make your printer port "dumb" >> and see >> if that makes things better. >> >> Matt >> >> >> ----- Original Message ----- >> From: "Evan Dower" >> To: >> Sent: Saturday, September 14, 2002 4:51 PM >> Subject: Re: Printer (lpt0) Device Busy >> >> >> > Hmm... I have used it only with MacOS (not X) and Linux, and >> according to >> > http://www.linuxprinting.org/show_printer.cgi?recnum=62112 "Printer >> supports >> > direct text printing with the `us-ascii' charset." Whether it >> requires >> some >> > initial setup I don't know, though it is (very specifically) >> detected at >> > startup. Do you know how I could check on that? or what I can do >> if that >> is >> > the case? >> > Thanks, >> > Evan Dower >> > >> > >> > >From: "Matthew Emmerton" >> > >To: "Evan Dower" >> > >Subject: Re: Printer (lpt0) Device Busy >> > >Date: Sat, 14 Sep 2002 00:09:48 -0400 >> > >MIME-Version: 1.0 >> > >Received: from tomts22-srv.bellnexxia.net ([209.226.175.184]) by >> > >mc2-f35.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); >> Fri, 13 >> > >Sep 2002 21:09:52 -0700 >> > >Received: from xena.gsicomp.on.ca ([65.95.177.86]) by >> > >tomts22-srv.bellnexxia.net (InterMail vM.5.01.04.19 >> > >201-253-122-122-119-20020516) with ESMTP id >> > ><20020914040948.SZOF15700.tomts22-srv.bellnexxia.net@xena.gsicomp.on.ca> >> > > for ; Sat, 14 Sep 2002 00:09:48 -0400 >> > >Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18])by >> > >xena.gsicomp.on.ca (8.11.3/8.11.3) with SMTP id g8E2twX94177for >> > >; Fri, 13 Sep 2002 22:55:58 -0400 >> (EDT)(envelope-from >> > >matt@gsicomp.on.ca) >> > >Message-ID: <001501c25ba4$91145c30$1200a8c0@gsicomp.on.ca> >> > >References: >> > >X-Priority: 3 >> > >X-MSMail-Priority: Normal >> > >X-Mailer: Microsoft Outlook Express 5.50.4807.1700 >> > >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 >> > >Return-Path: matt@gsicomp.on.ca >> > >X-OriginalArrivalTime: 14 Sep 2002 04:09:54.0043 (UTC) >> > >FILETIME=[9449E4B0:01C25BA4] >> > > >> > > > I am trying to install a printer (Epson Stylus Color 740), but >> FreeBSD >> > > > claims that the device (/dev/lpt0) is busy. I began with >> 4.6-RELEASE >> but >> > > > upgrade to -STABLE to see if that would fix the problem (it >> didn't). >> My >> > > > system is: >> > > > $ uname -a >> > > > FreeBSD lojak.u.washington.edu 4.7-PRERELEASE FreeBSD >> 4.7-PRERELEASE >> #0: >> > >Thu >> > > > Sep 12 00:21:06 PDT 2002 >> > > > root@lojak.u.washington.edu:/usr/obj/usr/src/sys/CUSTOM i386 >> > > > I even tried using the GENERIC kernel to no avail. I'm fairly >> certain >> my >> > > > kernel is set up properly anyway since the printer is detected >> at >> > >startup. >> > > > $ dmesg >> > > > ... >> > > > ppc0: at port 0x378-0x37f irq 7 on isa0 >> > > > ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode >> > > > ppc0: FIFO with 16/16/9 bytes threshold >> > > > ppbus0: IEEE1284 device found /NIBBLE >> > > > Probing for PnP devices on ppbus0: >> > > > ppbus0: PRINTER ESCPL2,BDC,D4 >> > > > lpt0: on ppbus0 >> > > > lpt0: Interrupt-driven port >> > > > ... >> > > > Yet still, if I try to do a test print, nothing happens. >> > > > # echo test > /dev/lpt0 >> > > > /dev/lpt0: Device busy. >> > > > In fact, even just trying to get status info does the same >> thing. >> > > > # cat /dev/lpt0 >> > > > cat: /dev/lpt0: Device busy >> > > > So the device is busy. Certainly, a program must be bogarting >> it. Yet >> > >fstat >> > > > begs to differ. >> > > > $ fstat /dev/lpt0 >> > > > USER CMD PID FD MOUNT INUM MODE >> SZ|DV R/W >> > >NAME >> > > > That's an empty list of open files named /dev/lpt0. >> > > >> > >If your Epson print is a "winprinter" (meaning that it requires >> special >> > >initialization before it will allow itself to print plain text), >> then the >> > >device will show up as busy if you try and do anything with it. >> > > >> > >-- >> > >Matt Emmerton >> > >> > >> > >> > >> > _________________________________________________________________ >> > Send and receive Hotmail on your mobile device: >> http://mobile.msn.com >> > >> > > > > > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hardware" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Sun Sep 15 22:13:10 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9288F37B401; Sun, 15 Sep 2002 22:12:57 -0700 (PDT) Received: from hotmail.com (f73.pav1.hotmail.com [64.4.31.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id E63AC43E65; Sun, 15 Sep 2002 22:12:56 -0700 (PDT) (envelope-from evantd@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 15 Sep 2002 22:12:56 -0700 Received: from 12.229.158.71 by pv1fd.pav1.hotmail.msn.com with HTTP; Mon, 16 Sep 2002 05:12:56 GMT X-Originating-IP: [12.229.158.71] From: "Evan Dower" To: neal@nelson.name Cc: matt@gsicomp.on.ca, freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org, freebsd-questions@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Printer (lpt0) Device Busy (Epson Stylus Color 740) Date: Sun, 15 Sep 2002 22:12:56 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 16 Sep 2002 05:12:56.0817 (UTC) FILETIME=[B7D2E610:01C25D3F] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Truth is I do have a USB card and a USB camera. The camera gets detected and recognized as a USB mass storage device, but I haven't figured out how to get it to mount (what with the scsi emulations and crap). Anyway, the hidden point here is that I would love to hear how you set it up for USB. Please, please, please tell me all about it. Thanks, Evan Dower >From: Neal Nelson >Reply-To: neal@nelson.name >To: Evan Dower >CC: matt@gsicomp.on.ca, >freebsd-hackers@freebsd.org,freebsd-hardware@freebsd.org, >freebsd-questions@freebsd.org,freebsd-stable@freebsd.org >Subject: Re: Printer (lpt0) Device Busy (Epson Stylus Color 740) >Date: Mon, 16 Sep 2002 15:12:44 +1000 >MIME-Version: 1.0 >Received: from mx2.freebsd.org ([216.136.204.119]) by >mc3-f37.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Sun, 15 >Sep 2002 22:08:07 -0700 >Received: from hub.freebsd.org (hub.FreeBSD.org [216.136.204.18])by >mx2.freebsd.org (Postfix) with ESMTPid 4BE9E55981; Sun, 15 Sep 2002 >22:07:14 -0700 (PDT)(envelope-from owner-freebsd-hardware@FreeBSD.ORG) >Received: by hub.freebsd.org (Postfix, from userid 538)id 9A15F37B401; Sun, >15 Sep 2002 22:06:56 -0700 (PDT) >Received: from localhost (localhost [127.0.0.1])by hub.freebsd.org >(Postfix) with SMTPid DD1F72E8023; Sun, 15 Sep 2002 22:06:55 -0700 (PDT) >Received: by hub.freebsd.org (bulk_mailer v1.12); Sun, 15 Sep 2002 22:06:55 >-0700 >Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])by >hub.freebsd.org (Postfix) with ESMTPid 6432D37B400; Sun, 15 Sep 2002 >22:06:45 -0700 (PDT) >Received: from server.home.neal.nelson.name >(CPE-203-51-147-163.vic.bigpond.net.au [203.51.147.163])by mx1.FreeBSD.org >(Postfix) with ESMTPid 55DAC43E42; Sun, 15 Sep 2002 22:06:43 -0700 >(PDT)(envelope-from neal@nelson.name) >Received: from server.home.neal.nelson.name (localhost [127.0.0.1])by >server.home.neal.nelson.name (8.12.6/8.12.5) with ESMTP id >g8G5Cicc000370;Mon, 16 Sep 2002 15:12:45 +1000 (EST)(envelope-from >neal@nelson.name) >Delivered-To: freebsd-hardware@freebsd.org >Message-ID: <20020916051244.GA351@server> >References: >In-Reply-To: ; from >evantd@hotmail.com on Mon, Sep 16, 2002 at 13:52:42 +1000 >X-Mailer: Balsa 1.4.0 >Lines: 185 >Sender: owner-freebsd-hardware@FreeBSD.ORG >List-ID: >List-Archive: (Web Archive) >List-Help: (List Instructions) >List-Subscribe: > >List-Unsubscribe: > >X-Loop: FreeBSD.org >Precedence: bulk >Return-Path: owner-freebsd-hardware@FreeBSD.ORG >X-OriginalArrivalTime: 16 Sep 2002 05:08:07.0752 (UTC) >FILETIME=[0B871480:01C25D3F] > >I've been using an Epson Stylus Color 740 on FreeBSD for ages without >problems. However, I'm using the USB interface not parallel with CUPS as my >print system. Probably of no help apart from that fact that it can be made >to work. > >On 2002.09.16 13:52 Evan Dower wrote: >>Has anyone even gotten an Epson Stylus Color 740 to work on FreeBSD 4.x? >>If so, I would love to get in touch with you. I can't seem to get mine to >>work regardless of BIOS settings. >>Thanks a lot, >>Evan Dower >> >> >>>From: "Matthew Emmerton" >>>To: "Evan Dower" >>>Subject: Re: Printer (lpt0) Device Busy >>>Date: Sat, 14 Sep 2002 18:13:57 -0400 >>>MIME-Version: 1.0 >>>Received: from tomts22-srv.bellnexxia.net ([209.226.175.184]) by >>>hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Sat, 14 Sep 2002 >>>15:14:00 -0700 >>>Received: from xena.gsicomp.on.ca ([65.95.177.86]) by >>>tomts22-srv.bellnexxia.net (InterMail vM.5.01.04.19 >>>201-253-122-122-119-20020516) with ESMTP id >>><20020914221357.LVJT15700.tomts22-srv.bellnexxia.net@xena.gsicomp.on.ca> >>> for ; Sat, 14 Sep 2002 18:13:57 -0400 >>>Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18])by >>>xena.gsicomp.on.ca (8.11.3/8.11.3) with SMTP id g8EL08X95409for >>>; Sat, 14 Sep 2002 17:00:08 -0400 (EDT)(envelope-from >>>matt@gsicomp.on.ca) >>>Message-ID: <015301c25c3c$05d36b50$1200a8c0@gsicomp.on.ca> >>>References: >>>X-Priority: 3 >>>X-MSMail-Priority: Normal >>>X-Mailer: Microsoft Outlook Express 5.50.4807.1700 >>>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 >>>Return-Path: matt@gsicomp.on.ca >>>X-OriginalArrivalTime: 14 Sep 2002 22:14:00.0302 (UTC) >>>FILETIME=[06E158E0:01C25C3C] >>> >>>Evan, >>> >>>If you've used it this way before with other OSes, then it's most likely >>>a >>>FreeBSD problem. >>> >>>I've had problems with some printer when running with EPP/ECP enabled in >>>the >>>BIOS. I'd try adjusting your BIOS to make your printer port "dumb" and >>>see >>>if that makes things better. >>> >>>Matt >>> >>> >>>----- Original Message ----- >>>From: "Evan Dower" >>>To: >>>Sent: Saturday, September 14, 2002 4:51 PM >>>Subject: Re: Printer (lpt0) Device Busy >>> >>> >>> > Hmm... I have used it only with MacOS (not X) and Linux, and according >>>to >>> > http://www.linuxprinting.org/show_printer.cgi?recnum=62112 "Printer >>>supports >>> > direct text printing with the `us-ascii' charset." Whether it requires >>>some >>> > initial setup I don't know, though it is (very specifically) detected >>>at >>> > startup. Do you know how I could check on that? or what I can do if >>>that >>>is >>> > the case? >>> > Thanks, >>> > Evan Dower >>> > >>> > >>> > >From: "Matthew Emmerton" >>> > >To: "Evan Dower" >>> > >Subject: Re: Printer (lpt0) Device Busy >>> > >Date: Sat, 14 Sep 2002 00:09:48 -0400 >>> > >MIME-Version: 1.0 >>> > >Received: from tomts22-srv.bellnexxia.net ([209.226.175.184]) by >>> > >mc2-f35.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Fri, >>>13 >>> > >Sep 2002 21:09:52 -0700 >>> > >Received: from xena.gsicomp.on.ca ([65.95.177.86]) by >>> > >tomts22-srv.bellnexxia.net (InterMail vM.5.01.04.19 >>> > >201-253-122-122-119-20020516) with ESMTP id >>> > >>> ><20020914040948.SZOF15700.tomts22-srv.bellnexxia.net@xena.gsicomp.on.ca> >>> > > for ; Sat, 14 Sep 2002 00:09:48 -0400 >>> > >Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18])by >>> > >xena.gsicomp.on.ca (8.11.3/8.11.3) with SMTP id g8E2twX94177for >>> > >; Fri, 13 Sep 2002 22:55:58 -0400 >>>(EDT)(envelope-from >>> > >matt@gsicomp.on.ca) >>> > >Message-ID: <001501c25ba4$91145c30$1200a8c0@gsicomp.on.ca> >>> > >References: >>> > >X-Priority: 3 >>> > >X-MSMail-Priority: Normal >>> > >X-Mailer: Microsoft Outlook Express 5.50.4807.1700 >>> > >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 >>> > >Return-Path: matt@gsicomp.on.ca >>> > >X-OriginalArrivalTime: 14 Sep 2002 04:09:54.0043 (UTC) >>> > >FILETIME=[9449E4B0:01C25BA4] >>> > > >>> > > > I am trying to install a printer (Epson Stylus Color 740), but >>>FreeBSD >>> > > > claims that the device (/dev/lpt0) is busy. I began with >>>4.6-RELEASE >>>but >>> > > > upgrade to -STABLE to see if that would fix the problem (it >>>didn't). >>>My >>> > > > system is: >>> > > > $ uname -a >>> > > > FreeBSD lojak.u.washington.edu 4.7-PRERELEASE FreeBSD >>>4.7-PRERELEASE >>>#0: >>> > >Thu >>> > > > Sep 12 00:21:06 PDT 2002 >>> > > > root@lojak.u.washington.edu:/usr/obj/usr/src/sys/CUSTOM i386 >>> > > > I even tried using the GENERIC kernel to no avail. I'm fairly >>>certain >>>my >>> > > > kernel is set up properly anyway since the printer is detected at >>> > >startup. >>> > > > $ dmesg >>> > > > ... >>> > > > ppc0: at port 0x378-0x37f irq 7 on isa0 >>> > > > ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode >>> > > > ppc0: FIFO with 16/16/9 bytes threshold >>> > > > ppbus0: IEEE1284 device found /NIBBLE >>> > > > Probing for PnP devices on ppbus0: >>> > > > ppbus0: PRINTER ESCPL2,BDC,D4 >>> > > > lpt0: on ppbus0 >>> > > > lpt0: Interrupt-driven port >>> > > > ... >>> > > > Yet still, if I try to do a test print, nothing happens. >>> > > > # echo test > /dev/lpt0 >>> > > > /dev/lpt0: Device busy. >>> > > > In fact, even just trying to get status info does the same thing. >>> > > > # cat /dev/lpt0 >>> > > > cat: /dev/lpt0: Device busy >>> > > > So the device is busy. Certainly, a program must be bogarting it. >>>Yet >>> > >fstat >>> > > > begs to differ. >>> > > > $ fstat /dev/lpt0 >>> > > > USER CMD PID FD MOUNT INUM MODE SZ|DV >>>R/W >>> > >NAME >>> > > > That's an empty list of open files named /dev/lpt0. >>> > > >>> > >If your Epson print is a "winprinter" (meaning that it requires >>>special >>> > >initialization before it will allow itself to print plain text), then >>>the >>> > >device will show up as busy if you try and do anything with it. >>> > > >>> > >-- >>> > >Matt Emmerton >>> > >>> > >>> > >>> > >>> > _________________________________________________________________ >>> > Send and receive Hotmail on your mobile device: http://mobile.msn.com >>> > >>> > >> >> >> >> >>_________________________________________________________________ >>Send and receive Hotmail on your mobile device: http://mobile.msn.com >> >> >>To Unsubscribe: send mail to majordomo@FreeBSD.org >>with "unsubscribe freebsd-hardware" in the body of the message > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-hardware" in the body of the message _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 1:36:20 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA89A37B400 for ; Mon, 16 Sep 2002 01:36:19 -0700 (PDT) Received: from relay02.cablecom.net (relay02.cablecom.net [62.2.33.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF16B43E3B for ; Mon, 16 Sep 2002 01:36:18 -0700 (PDT) (envelope-from hanspeter_roth@hotmail.com) Received: from gicco.cablecom.ch (dclient80-218-72-191.hispeed.ch [80.218.72.191]) by relay02.cablecom.net (8.12.5/8.12.5/SOL/AWF/MXRELAY/20020820) with ESMTP id g8G8aHWs080213 for ; Mon, 16 Sep 2002 10:36:17 +0200 (CEST) (envelope-from hanspeter_roth@hotmail.com) Received: (from idefix@localhost) by gicco.cablecom.ch (8.11.6/8.11.6) id g8G8aHd00708 for freebsd-hackers@freebsd.org; Mon, 16 Sep 2002 10:36:17 +0200 (CEST) (envelope-from hanspeter_roth@hotmail.com) Date: Mon, 16 Sep 2002 10:36:17 +0200 From: Hanspeter Roth To: freebsd-hackers@freebsd.org Subject: converting cdr/acd0t1 to wav Message-ID: <20020916103617.A651@gicco.cablecom.ch> Reply-To: freebsd-hackers@freebsd.org 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.2.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, I'm trying to convert /dev/acd0t1 to a wav format file. Thus I did dd if=/dev/acd0t1 of=1.cdr bs=2352 sox 1.cdr 1.wav But when playing 1.wav there is only noise. Other wavs from /windows/media sound ok. I have deleted /dev/acd0t{30..99}. This shouldn't be a problem, should it? How can one convert acd0t1 to wav and get a reasonable sound? -Hanspeter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 1:43:35 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4A9537B400 for ; Mon, 16 Sep 2002 01:43:34 -0700 (PDT) Received: from abigail.blackend.org (blackend.org [212.11.50.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15D2A43E4A for ; Mon, 16 Sep 2002 01:43:33 -0700 (PDT) (envelope-from marc@blackend.org) Received: from marduk.blackend.org (marduk.blackend.org [192.168.1.202]) by abigail.blackend.org (8.12.3/8.12.3) with ESMTP id g8G8eLUx042133 for ; Mon, 16 Sep 2002 10:40:21 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: from marduk.blackend.org (localhost [127.0.0.1]) by marduk.blackend.org (8.12.5/8.12.5) with ESMTP id g8G8gRnZ041376 for ; Mon, 16 Sep 2002 10:42:27 +0200 (CEST) (envelope-from marc@localhost.blackend.org) Received: (from marc@localhost) by marduk.blackend.org (8.12.5/8.12.5/Submit) id g8G8gRj5041375 for freebsd-hackers@freebsd.org; Mon, 16 Sep 2002 10:42:27 +0200 (CEST) (envelope-from marc) Date: Mon, 16 Sep 2002 10:42:26 +0200 From: Marc Fonvieille To: freebsd-hackers@freebsd.org Subject: Re: converting cdr/acd0t1 to wav Message-ID: <20020916084226.GC262@marduk.blackend.org> References: <20020916103617.A651@gicco.cablecom.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020916103617.A651@gicco.cablecom.ch> User-Agent: Mutt/1.4i X-Useless-Header: blackend.org X-Operating-System: FreeBSD 4.6-STABLE Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Sep 16, 2002 at 10:36:17AM +0200, Hanspeter Roth wrote: > > Hello, > > I'm trying to convert /dev/acd0t1 to a wav format file. > Thus I did > > dd if=/dev/acd0t1 of=1.cdr bs=2352 > sox 1.cdr 1.wav > > But when playing 1.wav there is only noise. > Other wavs from /windows/media sound ok. > Have a look in the Handbook to "16.3.4 Decoding MP3s" at http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/sound-mp3.html there is an example about raw-->wav conversion with SoX. Marc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 1:53:34 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75CD037B400 for ; Mon, 16 Sep 2002 01:53:33 -0700 (PDT) Received: from abigail.blackend.org (blackend.org [212.11.50.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29EF043E77 for ; Mon, 16 Sep 2002 01:53:32 -0700 (PDT) (envelope-from marc@blackend.org) Received: from marduk.blackend.org (marduk.blackend.org [192.168.1.202]) by abigail.blackend.org (8.12.3/8.12.3) with ESMTP id g8G8qxUx042217; Mon, 16 Sep 2002 10:52:59 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: from marduk.blackend.org (localhost [127.0.0.1]) by marduk.blackend.org (8.12.5/8.12.5) with ESMTP id g8G8t4nZ041425; Mon, 16 Sep 2002 10:55:04 +0200 (CEST) (envelope-from marc@localhost.blackend.org) Received: (from marc@localhost) by marduk.blackend.org (8.12.5/8.12.5/Submit) id g8G8t3bG041424; Mon, 16 Sep 2002 10:55:03 +0200 (CEST) (envelope-from marc) Date: Mon, 16 Sep 2002 10:55:03 +0200 From: Marc Fonvieille To: freebsd-hackers@freebsd.org Cc: Hanspeter Roth Subject: Re: converting cdr/acd0t1 to wav Message-ID: <20020916085503.GE262@marduk.blackend.org> References: <20020916103617.A651@gicco.cablecom.ch> <20020916084226.GC262@marduk.blackend.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020916084226.GC262@marduk.blackend.org> User-Agent: Mutt/1.4i X-Useless-Header: blackend.org X-Operating-System: FreeBSD 4.6-STABLE Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Sep 16, 2002 at 10:42:26AM +0200, Marc Fonvieille wrote: > On Mon, Sep 16, 2002 at 10:36:17AM +0200, Hanspeter Roth wrote: x > > > > Hello, > > > > I'm trying to convert /dev/acd0t1 to a wav format file. > > Thus I did > > > > dd if=/dev/acd0t1 of=1.cdr bs=2352 > > sox 1.cdr 1.wav > > > > But when playing 1.wav there is only noise. > > Other wavs from /windows/media sound ok. > > > Have a look in the Handbook to > > "16.3.4 Decoding MP3s" at > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/sound-mp3.html > > there is an example about raw-->wav conversion with SoX. > Err my bad it's a wav-->raw example :)) The syntax is very close for raw-->wav: sox -t raw -r 44100 -s -w -c 2 file.raw file.wav Marc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 1:57:31 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0646A37B400 for ; Mon, 16 Sep 2002 01:57:31 -0700 (PDT) Received: from insomnia.spc.org (insomnia.spc.org [195.224.94.183]) by mx1.FreeBSD.org (Postfix) with SMTP id 4DB1443E72 for ; Mon, 16 Sep 2002 01:57:30 -0700 (PDT) (envelope-from bms@insomnia.spc.org) Received: (qmail 19215 invoked by uid 1031); 16 Sep 2002 08:54:46 -0000 Date: Mon, 16 Sep 2002 09:54:45 +0100 From: Bruce M Simpson To: Leslie Jackson Cc: freebsd-hackers@freebsd.org Subject: Re: ioctl & SIOCDIFADDR Message-ID: <20020916085445.GA11460@spc.org> Mail-Followup-To: Bruce M Simpson , Leslie Jackson , freebsd-hackers@freebsd.org References: <20020916114315.7feb4bac.int@softhome.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020916114315.7feb4bac.int@softhome.net> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Sep 16, 2002 at 11:43:15AM +0800, Leslie Jackson wrote: > I can specify an specific IP, say, "192.168.0.2", for SIOCDIFADDR to delete. > But how can i specify this "default address"(said in the netintor(4)) to > "delete the first address of the interface"? Try 0.0.0.0. (aka INADDR_ANY). BMS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 2: 0:11 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9ABC037B400 for ; Mon, 16 Sep 2002 02:00:09 -0700 (PDT) Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 343B943E3B for ; Mon, 16 Sep 2002 02:00:09 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020916090008.IMQR26805.rwcrmhc52.attbi.com@InterJet.elischer.org> for ; Mon, 16 Sep 2002 09:00:08 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id BAA93671 for ; Mon, 16 Sep 2002 01:45:39 -0700 (PDT) Date: Mon, 16 Sep 2002 01:45:39 -0700 (PDT) From: Julian Elischer To: freebsd-hackers@freebsd.org Subject: Re: converting cdr/acd0t1 to wav In-Reply-To: <20020916103617.A651@gicco.cablecom.ch> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The native data on a cd is not .wav format you need a program that reads a cd, and converts it to wav check the program dagrab in the ports/audio collection (I then use bladeenc to convert teh wav to mp3) (they are much smaller). On Mon, 16 Sep 2002, Hanspeter Roth wrote: > > Hello, > > I'm trying to convert /dev/acd0t1 to a wav format file. > Thus I did > > dd if=/dev/acd0t1 of=1.cdr bs=2352 > sox 1.cdr 1.wav > > But when playing 1.wav there is only noise. > Other wavs from /windows/media sound ok. > > I have deleted /dev/acd0t{30..99}. This shouldn't be a problem, > should it? > > How can one convert acd0t1 to wav and get a reasonable sound? > > -Hanspeter > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 2:12: 9 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA34A37B400 for ; Mon, 16 Sep 2002 02:12:07 -0700 (PDT) Received: from relay03.cablecom.net (relay03.cablecom.net [62.2.33.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDFD743E3B for ; Mon, 16 Sep 2002 02:12:06 -0700 (PDT) (envelope-from hanspeter_roth@hotmail.com) Received: from gicco.cablecom.ch (dclient80-218-72-191.hispeed.ch [80.218.72.191]) by relay03.cablecom.net (8.12.5/8.12.5/SOL/AWF/MXRELAY/20020820) with ESMTP id g8G9C5MO008378 for ; Mon, 16 Sep 2002 11:12:05 +0200 (CEST) (envelope-from hanspeter_roth@hotmail.com) Received: (from idefix@localhost) by gicco.cablecom.ch (8.11.6/8.11.6) id g8G9C5E00915 for freebsd-hackers@FreeBSD.ORG; Mon, 16 Sep 2002 11:12:05 +0200 (CEST) (envelope-from hanspeter_roth@hotmail.com) Date: Mon, 16 Sep 2002 11:12:05 +0200 From: Hanspeter Roth To: freebsd-hackers@FreeBSD.ORG Subject: Re: converting cdr/acd0t1 to wav Message-ID: <20020916111205.A836@gicco.cablecom.ch> Reply-To: freebsd-hackers@FreeBSD.ORG Mail-Followup-To: freebsd-hackers@FreeBSD.ORG References: <20020916103617.A651@gicco.cablecom.ch> <20020916084226.GC262@marduk.blackend.org> <20020916085503.GE262@marduk.blackend.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020916085503.GE262@marduk.blackend.org>; from blackend@FreeBSD.ORG on Mon, Sep 16, 2002 at 10:55:03AM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sep 16 at 10:55, Marc Fonvieille spoke: > The syntax is very close for raw-->wav: > > sox -t raw -r 44100 -s -w -c 2 file.raw file.wav Yes, this works! Thank you. It seems that raw and cdr are similar. -Hanspeter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 2:13:51 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CB3E37B400 for ; Mon, 16 Sep 2002 02:13:49 -0700 (PDT) Received: from south.nanolink.com (south.nanolink.com [217.75.134.10]) by mx1.FreeBSD.org (Postfix) with SMTP id DFBEF43E72 for ; Mon, 16 Sep 2002 02:13:47 -0700 (PDT) (envelope-from roam@ringlet.net) Received: (qmail 25789 invoked by uid 85); 16 Sep 2002 09:22:17 -0000 Received: from office.sbnd.net (HELO straylight.ringlet.net) (217.75.140.130) by south.nanolink.com with SMTP; 16 Sep 2002 09:22:16 -0000 Received: (qmail 11842 invoked by uid 1000); 16 Sep 2002 09:12:36 -0000 Date: Mon, 16 Sep 2002 12:12:36 +0300 From: Peter Pentchev To: Julian Elischer Cc: freebsd-hackers@freebsd.org Subject: Re: converting cdr/acd0t1 to wav Message-ID: <20020916091235.GF360@straylight.oblivion.bg> Mail-Followup-To: Julian Elischer , freebsd-hackers@freebsd.org References: <20020916103617.A651@gicco.cablecom.ch> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RIYY1s2vRbPFwWeW" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-Virus-Scanned: by Nik's Monitoring Daemon (AMaViS perl-11d ) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --RIYY1s2vRbPFwWeW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 16, 2002 at 01:45:39AM -0700, Julian Elischer wrote: > On Mon, 16 Sep 2002, Hanspeter Roth wrote: >=20 > >=20 > > Hello, > >=20 > > I'm trying to convert /dev/acd0t1 to a wav format file. > > Thus I did > >=20 > > dd if=3D/dev/acd0t1 of=3D1.cdr bs=3D2352 > > sox 1.cdr 1.wav > >=20 > > But when playing 1.wav there is only noise. > > Other wavs from /windows/media sound ok. > >=20 > > I have deleted /dev/acd0t{30..99}. This shouldn't be a problem, > > should it? > >=20 > > How can one convert acd0t1 to wav and get a reasonable sound? > >=20 > The native data on a cd is not .wav format > you need a program that reads a cd, and converts it to wav >=20 > check the program dagrab in the ports/audio collection > (I then use bladeenc to convert teh wav to mp3) > (they are much smaller). I believe that this is the reason he was using sox :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 If this sentence were in Chinese, it would say something else. --RIYY1s2vRbPFwWeW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9haCD7Ri2jRYZRVMRAkpBAJ9jvp1SaulJXXGdd69zyTkxfNbMXQCgttVy eRcPel1tDPL6+BuZjY3lXtk= =hHOX -----END PGP SIGNATURE----- --RIYY1s2vRbPFwWeW-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 2:15:30 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0ECFD37B400; Mon, 16 Sep 2002 02:15:16 -0700 (PDT) Received: from host217-41-22-89.in-addr.btopenworld.com (host217-41-22-89.in-addr.btopenworld.com [217.41.22.89]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14F3043E3B; Mon, 16 Sep 2002 02:15:15 -0700 (PDT) (envelope-from dom@host217-41-22-89.in-addr.btopenworld.com) Received: by host217-41-22-89.in-addr.btopenworld.com (Postfix, from userid 1001) id 7050A533; Mon, 16 Sep 2002 10:16:03 +0100 (BST) Date: Mon, 16 Sep 2002 10:16:03 +0100 From: Dominic Marks To: Evan Dower Cc: neal@nelson.name, matt@gsicomp.on.ca, freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org, freebsd-questions@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Printer (lpt0) Device Busy (Epson Stylus Color 740) Message-ID: <20020916091603.GA429@gallium> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Sep 15, 2002 at 10:12:56PM -0700, Evan Dower wrote: > Truth is I do have a USB card and a USB camera. The camera gets detected > and recognized as a USB mass storage device, but I haven't figured out how > to get it to mount (what with the scsi emulations and crap). Anyway, the I mount my FujiFilm FinePix A101 like this: # mkdir /camera # chmod 777 /camera # mount_msdos /dev/da0s1 /camera In my kernel configuration I have: device usb device uhci device ohci device umass device scbus device da device pass > hidden point here is that I would love to hear how you set it up for USB. > Please, please, please tell me all about it. > Thanks, > Evan Dower > > > >From: Neal Nelson > >Reply-To: neal@nelson.name > >To: Evan Dower > >CC: matt@gsicomp.on.ca, > >freebsd-hackers@freebsd.org,freebsd-hardware@freebsd.org, > >freebsd-questions@freebsd.org,freebsd-stable@freebsd.org > >Subject: Re: Printer (lpt0) Device Busy (Epson Stylus Color 740) > >Date: Mon, 16 Sep 2002 15:12:44 +1000 > >MIME-Version: 1.0 > >Received: from mx2.freebsd.org ([216.136.204.119]) by > >mc3-f37.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Sun, 15 > >Sep 2002 22:08:07 -0700 > >Received: from hub.freebsd.org (hub.FreeBSD.org [216.136.204.18])by > >mx2.freebsd.org (Postfix) with ESMTPid 4BE9E55981; Sun, 15 Sep 2002 > >22:07:14 -0700 (PDT)(envelope-from owner-freebsd-hardware@FreeBSD.ORG) > >Received: by hub.freebsd.org (Postfix, from userid 538)id 9A15F37B401; > >Sun, 15 Sep 2002 22:06:56 -0700 (PDT) > >Received: from localhost (localhost [127.0.0.1])by hub.freebsd.org > >(Postfix) with SMTPid DD1F72E8023; Sun, 15 Sep 2002 22:06:55 -0700 (PDT) > >Received: by hub.freebsd.org (bulk_mailer v1.12); Sun, 15 Sep 2002 > >22:06:55 -0700 > >Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])by > >hub.freebsd.org (Postfix) with ESMTPid 6432D37B400; Sun, 15 Sep 2002 > >22:06:45 -0700 (PDT) > >Received: from server.home.neal.nelson.name > >(CPE-203-51-147-163.vic.bigpond.net.au [203.51.147.163])by mx1.FreeBSD.org > >(Postfix) with ESMTPid 55DAC43E42; Sun, 15 Sep 2002 22:06:43 -0700 > >(PDT)(envelope-from neal@nelson.name) > >Received: from server.home.neal.nelson.name (localhost [127.0.0.1])by > >server.home.neal.nelson.name (8.12.6/8.12.5) with ESMTP id > >g8G5Cicc000370;Mon, 16 Sep 2002 15:12:45 +1000 (EST)(envelope-from > >neal@nelson.name) > >Delivered-To: freebsd-hardware@freebsd.org > >Message-ID: <20020916051244.GA351@server> > >References: > >In-Reply-To: ; from > >evantd@hotmail.com on Mon, Sep 16, 2002 at 13:52:42 +1000 > >X-Mailer: Balsa 1.4.0 > >Lines: 185 > >Sender: owner-freebsd-hardware@FreeBSD.ORG > >List-ID: > >List-Archive: (Web Archive) > >List-Help: (List Instructions) > >List-Subscribe: > > > >List-Unsubscribe: > > > >X-Loop: FreeBSD.org > >Precedence: bulk > >Return-Path: owner-freebsd-hardware@FreeBSD.ORG > >X-OriginalArrivalTime: 16 Sep 2002 05:08:07.0752 (UTC) > >FILETIME=[0B871480:01C25D3F] > > > >I've been using an Epson Stylus Color 740 on FreeBSD for ages without > >problems. However, I'm using the USB interface not parallel with CUPS as > >my print system. Probably of no help apart from that fact that it can be > >made to work. > > > >On 2002.09.16 13:52 Evan Dower wrote: > >>Has anyone even gotten an Epson Stylus Color 740 to work on FreeBSD 4.x? > >>If so, I would love to get in touch with you. I can't seem to get mine to > >>work regardless of BIOS settings. > >>Thanks a lot, > >>Evan Dower > >> > >> > >>>From: "Matthew Emmerton" > >>>To: "Evan Dower" > >>>Subject: Re: Printer (lpt0) Device Busy > >>>Date: Sat, 14 Sep 2002 18:13:57 -0400 > >>>MIME-Version: 1.0 > >>>Received: from tomts22-srv.bellnexxia.net ([209.226.175.184]) by > >>>hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Sat, 14 Sep 2002 > >>>15:14:00 -0700 > >>>Received: from xena.gsicomp.on.ca ([65.95.177.86]) by > >>>tomts22-srv.bellnexxia.net (InterMail vM.5.01.04.19 > >>>201-253-122-122-119-20020516) with ESMTP id > >>><20020914221357.LVJT15700.tomts22-srv.bellnexxia.net@xena.gsicomp.on.ca> > >>> for ; Sat, 14 Sep 2002 18:13:57 -0400 > >>>Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18])by > >>>xena.gsicomp.on.ca (8.11.3/8.11.3) with SMTP id g8EL08X95409for > >>>; Sat, 14 Sep 2002 17:00:08 -0400 > >>>(EDT)(envelope-from matt@gsicomp.on.ca) > >>>Message-ID: <015301c25c3c$05d36b50$1200a8c0@gsicomp.on.ca> > >>>References: > >>>X-Priority: 3 > >>>X-MSMail-Priority: Normal > >>>X-Mailer: Microsoft Outlook Express 5.50.4807.1700 > >>>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 > >>>Return-Path: matt@gsicomp.on.ca > >>>X-OriginalArrivalTime: 14 Sep 2002 22:14:00.0302 (UTC) > >>>FILETIME=[06E158E0:01C25C3C] > >>> > >>>Evan, > >>> > >>>If you've used it this way before with other OSes, then it's most likely > >>>a > >>>FreeBSD problem. > >>> > >>>I've had problems with some printer when running with EPP/ECP enabled in > >>>the > >>>BIOS. I'd try adjusting your BIOS to make your printer port "dumb" and > >>>see > >>>if that makes things better. > >>> > >>>Matt > >>> > >>> > >>>----- Original Message ----- > >>>From: "Evan Dower" > >>>To: > >>>Sent: Saturday, September 14, 2002 4:51 PM > >>>Subject: Re: Printer (lpt0) Device Busy > >>> > >>> > >>>> Hmm... I have used it only with MacOS (not X) and Linux, and according > >>>to > >>>> http://www.linuxprinting.org/show_printer.cgi?recnum=62112 "Printer > >>>supports > >>>> direct text printing with the `us-ascii' charset." Whether it requires > >>>some > >>>> initial setup I don't know, though it is (very specifically) detected > >>>at > >>>> startup. Do you know how I could check on that? or what I can do if > >>>that > >>>is > >>>> the case? > >>>> Thanks, > >>>> Evan Dower > >>>> > >>>> > >>>> >From: "Matthew Emmerton" > >>>> >To: "Evan Dower" > >>>> >Subject: Re: Printer (lpt0) Device Busy > >>>> >Date: Sat, 14 Sep 2002 00:09:48 -0400 > >>>> >MIME-Version: 1.0 > >>>> >Received: from tomts22-srv.bellnexxia.net ([209.226.175.184]) by > >>>> >mc2-f35.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Fri, > >>>13 > >>>> >Sep 2002 21:09:52 -0700 > >>>> >Received: from xena.gsicomp.on.ca ([65.95.177.86]) by > >>>> >tomts22-srv.bellnexxia.net (InterMail vM.5.01.04.19 > >>>> >201-253-122-122-119-20020516) with ESMTP id > >>>> > >>>><20020914040948.SZOF15700.tomts22-srv.bellnexxia.net@xena.gsicomp.on.ca> > >>>> > for ; Sat, 14 Sep 2002 00:09:48 -0400 > >>>> >Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18])by > >>>> >xena.gsicomp.on.ca (8.11.3/8.11.3) with SMTP id g8E2twX94177for > >>>> >; Fri, 13 Sep 2002 22:55:58 -0400 > >>>(EDT)(envelope-from > >>>> >matt@gsicomp.on.ca) > >>>> >Message-ID: <001501c25ba4$91145c30$1200a8c0@gsicomp.on.ca> > >>>> >References: > >>>> >X-Priority: 3 > >>>> >X-MSMail-Priority: Normal > >>>> >X-Mailer: Microsoft Outlook Express 5.50.4807.1700 > >>>> >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 > >>>> >Return-Path: matt@gsicomp.on.ca > >>>> >X-OriginalArrivalTime: 14 Sep 2002 04:09:54.0043 (UTC) > >>>> >FILETIME=[9449E4B0:01C25BA4] > >>>> > > >>>> > > I am trying to install a printer (Epson Stylus Color 740), but > >>>FreeBSD > >>>> > > claims that the device (/dev/lpt0) is busy. I began with > >>>4.6-RELEASE > >>>but > >>>> > > upgrade to -STABLE to see if that would fix the problem (it > >>>didn't). > >>>My > >>>> > > system is: > >>>> > > $ uname -a > >>>> > > FreeBSD lojak.u.washington.edu 4.7-PRERELEASE FreeBSD > >>>4.7-PRERELEASE > >>>#0: > >>>> >Thu > >>>> > > Sep 12 00:21:06 PDT 2002 > >>>> > > root@lojak.u.washington.edu:/usr/obj/usr/src/sys/CUSTOM i386 > >>>> > > I even tried using the GENERIC kernel to no avail. I'm fairly > >>>certain > >>>my > >>>> > > kernel is set up properly anyway since the printer is detected at > >>>> >startup. > >>>> > > $ dmesg > >>>> > > ... > >>>> > > ppc0: at port 0x378-0x37f irq 7 on isa0 > >>>> > > ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode > >>>> > > ppc0: FIFO with 16/16/9 bytes threshold > >>>> > > ppbus0: IEEE1284 device found /NIBBLE > >>>> > > Probing for PnP devices on ppbus0: > >>>> > > ppbus0: PRINTER ESCPL2,BDC,D4 > >>>> > > lpt0: on ppbus0 > >>>> > > lpt0: Interrupt-driven port > >>>> > > ... > >>>> > > Yet still, if I try to do a test print, nothing happens. > >>>> > > # echo test > /dev/lpt0 > >>>> > > /dev/lpt0: Device busy. > >>>> > > In fact, even just trying to get status info does the same thing. > >>>> > > # cat /dev/lpt0 > >>>> > > cat: /dev/lpt0: Device busy > >>>> > > So the device is busy. Certainly, a program must be bogarting it. > >>>Yet > >>>> >fstat > >>>> > > begs to differ. > >>>> > > $ fstat /dev/lpt0 > >>>> > > USER CMD PID FD MOUNT INUM MODE SZ|DV > >>>R/W > >>>> >NAME > >>>> > > That's an empty list of open files named /dev/lpt0. > >>>> > > >>>> >If your Epson print is a "winprinter" (meaning that it requires > >>>special > >>>> >initialization before it will allow itself to print plain text), then > >>>the > >>>> >device will show up as busy if you try and do anything with it. > >>>> > > >>>> >-- > >>>> >Matt Emmerton > >>>> > >>>> > >>>> > >>>> > >>>> _________________________________________________________________ > >>>> Send and receive Hotmail on your mobile device: http://mobile.msn.com > >>>> > >>>> > >> > >> > >> > >> > >>_________________________________________________________________ > >>Send and receive Hotmail on your mobile device: http://mobile.msn.com > >> > >> > >>To Unsubscribe: send mail to majordomo@FreeBSD.org > >>with "unsubscribe freebsd-hardware" in the body of the message > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org > >with "unsubscribe freebsd-hardware" in the body of the message > > > > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- Dominic Marks << dominic_marks at btinternet.com >> Computer & Politics Geek To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 2:34:32 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 39A4337B400 for ; Mon, 16 Sep 2002 02:34:31 -0700 (PDT) Received: from relay01.cablecom.net (relay01.cablecom.net [62.2.33.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FC3A43E72 for ; Mon, 16 Sep 2002 02:34:30 -0700 (PDT) (envelope-from hanspeter_roth@hotmail.com) Received: from gicco.cablecom.ch (dclient80-218-72-191.hispeed.ch [80.218.72.191]) by relay01.cablecom.net (8.12.5/8.12.5/SOL/AWF/MXRELAY/20020820) with ESMTP id g8G9YS20093478 for ; Mon, 16 Sep 2002 11:34:28 +0200 (CEST) (envelope-from hanspeter_roth@hotmail.com) Received: (from idefix@localhost) by gicco.cablecom.ch (8.11.6/8.11.6) id g8G9YRn01422 for freebsd-hackers@FreeBSD.ORG; Mon, 16 Sep 2002 11:34:27 +0200 (CEST) (envelope-from hanspeter_roth@hotmail.com) Date: Mon, 16 Sep 2002 11:34:26 +0200 From: Hanspeter Roth To: freebsd-hackers@FreeBSD.ORG Subject: Re: converting cdr/acd0t1 to wav Message-ID: <20020916113426.B836@gicco.cablecom.ch> Reply-To: freebsd-hackers@FreeBSD.ORG Mail-Followup-To: freebsd-hackers@FreeBSD.ORG References: <20020916103617.A651@gicco.cablecom.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from julian@elischer.org on Mon, Sep 16, 2002 at 01:45:39AM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sep 16 at 01:45, Julian Elischer spoke: > check the program dagrab in the ports/audio collection Thanks for the hint. > (I then use bladeenc to convert teh wav to mp3) I intended to use lame. Quality is not a priority for me. -Hanspeter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 3:58: 3 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F44437B400 for ; Mon, 16 Sep 2002 03:58:02 -0700 (PDT) Received: from orthanc.ab.ca (orthanc.ab.ca [216.123.203.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFA0843E42 for ; Mon, 16 Sep 2002 03:58:01 -0700 (PDT) (envelope-from lyndon@orthanc.ab.ca) Received: from orthanc.ab.ca (localhost.orthanc.ab.ca [127.0.0.1]) by orthanc.ab.ca (8.12.6/8.12.6) with ESMTP id g8GAaMsl087346 for ; Mon, 16 Sep 2002 04:36:22 -0600 (MDT) (envelope-from lyndon@orthanc.ab.ca) Message-Id: <200209161036.g8GAaMsl087346@orthanc.ab.ca> To: freebsd-hackers@freebsd.org Subject: Patch to fix 'make tags' Organization: The Frobozz Magic Homing Pigeon Company X-Mailer: mh-e 6.1+cvs; MH 6.8.4; Emacs 21.2 Date: Mon, 16 Sep 2002 04:36:21 -0600 From: Lyndon Nerenberg Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG When gtags was removed from the system the tags target wasn't reverted to use ctags. I have a set of patches (against STABLE) that fix this in ftp://orthanc.ab.ca/lyndon/freebsd/share/mk/tags.patch. --lyndon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 4: 3:27 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C834C37B400 for ; Mon, 16 Sep 2002 04:03:25 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id E466A43E3B for ; Mon, 16 Sep 2002 04:03:24 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 64B7A3ABD40; Mon, 16 Sep 2002 13:07:35 +0200 (CEST) Date: Mon, 16 Sep 2002 13:07:35 +0200 From: Pawel Jakub Dawidek To: freebsd-hackers@freebsd.org Subject: Re: Changing process informations. Message-ID: <20020916110734.GE68652@garage.freebsd.pl> References: <20020915030157.GP68652@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="h13GW2gLSV2TxsNR" Content-Disposition: inline In-Reply-To: <20020915030157.GP68652@garage.freebsd.pl> X-PGP-Key-URL: http://garage.freebsd.pl/jules.pgp X-OS: FreeBSD 4.6-STABLE i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --h13GW2gLSV2TxsNR Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 15, 2002 at 05:01:57AM +0200, Pawel Jakub Dawidek wrote: Ok, more precise. All functions should be correct, bit I'm not sure here: +> void +> delgroup(struct proc *p, gid_t gid) +> { [...] +> setsugid(p); /* XXX: Have to be here? */ +> } When I'm removing group should I call setsugid() and set P_SUGID flag? I think that in delgroup() this shouln't be done. Am I right? But in other hand setsugid() is always called after setgroups(). --=20 Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. --h13GW2gLSV2TxsNR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPYW7dj/PhmMH/Mf1AQHrTQP/diN+7OdW5oaOaDkHlHcu7AYlzAx4ERuG +rZ1QAs52Wfm4quswmMKOFV2/H4WKdbJ0ojHkG4/Ytee6941i4YOeyX2WcjrFJLT wSQylyIyvgQRegJxjqj8UpC649Gq+Nt4K1oTdU0pVZylTmfxx8URpXe8ty4Eu0Gr yGfRp4/daWc= =ZgP3 -----END PGP SIGNATURE----- --h13GW2gLSV2TxsNR-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 4:35:41 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E7DA337B400 for ; Mon, 16 Sep 2002 04:35:40 -0700 (PDT) Received: from apache.metrocom.ru (apache.metrocom.ru [195.5.128.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEA8543E6E for ; Mon, 16 Sep 2002 04:35:35 -0700 (PDT) (envelope-from alex@metrocom.ru) Received: from apache.metrocom.ru (localhost [127.0.0.1]) by apache.metrocom.ru (8.12.3/8.12.3) with ESMTP id g8GBZYp5004386 for ; Mon, 16 Sep 2002 15:35:34 +0400 (MSD) Received: from localhost (alex@localhost) by apache.metrocom.ru (8.12.3/8.12.3/Submit) with ESMTP id g8GBZXnA004383 for ; Mon, 16 Sep 2002 15:35:34 +0400 (MSD) X-Authentication-Warning: apache.metrocom.ru: alex owned process doing -bs Date: Mon, 16 Sep 2002 15:35:33 +0400 (MSD) From: Varshavchick Alexander To: Subject: /dev/null sources Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi all, I'd wish to implement something like /dev/null or /dev/zero driver taking the original source code as a base, but I can't find the sources themselves, can you help? Thanks ---- Alexander Varshavchick, Metrocom Joint Stock Company Phone: (812)118-3322, 118-3115(fax) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 5:24:32 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA5E237B400 for ; Mon, 16 Sep 2002 05:24:30 -0700 (PDT) Received: from south.nanolink.com (south.nanolink.com [217.75.134.10]) by mx1.FreeBSD.org (Postfix) with SMTP id 163A643E72 for ; Mon, 16 Sep 2002 05:24:29 -0700 (PDT) (envelope-from roam@ringlet.net) Received: (qmail 26805 invoked by uid 85); 16 Sep 2002 12:32:56 -0000 Received: from office.sbnd.net (HELO straylight.ringlet.net) (217.75.140.130) by south.nanolink.com with SMTP; 16 Sep 2002 12:32:55 -0000 Received: (qmail 13296 invoked by uid 1000); 16 Sep 2002 12:23:14 -0000 Date: Mon, 16 Sep 2002 15:23:14 +0300 From: Peter Pentchev To: Varshavchick Alexander Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: /dev/null sources Message-ID: <20020916122314.GI360@straylight.oblivion.bg> Mail-Followup-To: Varshavchick Alexander , freebsd-hackers@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DO5DiztRLs659m5i" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-Virus-Scanned: by Nik's Monitoring Daemon (AMaViS perl-11d ) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --DO5DiztRLs659m5i Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 16, 2002 at 03:35:33PM +0400, Varshavchick Alexander wrote: > Hi all, >=20 > I'd wish to implement something like /dev/null or /dev/zero driver taking > the original source code as a base, but I can't find the sources > themselves, can you help? /dev/mem, /dev/null and /dev/zero are all handled by code in the sys///mem.c file. Note that for the i386 architecture there are several files: except the plain vanilla sys/i386/i386/mem.c, there are also i686_mem.c and k6_mem.c in the same directory. This is all under -STABLE; things may be a bit different in -CURRENT. G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 I am the meaning of this sentence. --DO5DiztRLs659m5i Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9hc0x7Ri2jRYZRVMRAt/EAKCaTcYjaEcyuNiqdexyuGIR6QCQjwCggEoW x5l7/g1uxqSbCY11xnkrXEU= =LxCm -----END PGP SIGNATURE----- --DO5DiztRLs659m5i-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 7:41:57 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B238337B401 for ; Mon, 16 Sep 2002 07:41:55 -0700 (PDT) Received: from jive.SoftHome.net (jive.SoftHome.net [66.54.152.27]) by mx1.FreeBSD.org (Postfix) with SMTP id 18D7B43E6E for ; Mon, 16 Sep 2002 07:41:55 -0700 (PDT) (envelope-from int@softhome.net) Received: (qmail 7467 invoked by uid 417); 16 Sep 2002 14:41:54 -0000 Received: from shunt-smtp-out-0 (HELO softhome.net) (172.16.3.12) by shunt-smtp-out-0 with SMTP; 16 Sep 2002 14:41:54 -0000 Received: from int.homeunix.org ([218.58.82.222]) (AUTH: LOGIN int@softhome.net) by softhome.net with esmtp; Mon, 16 Sep 2002 08:41:53 -0600 Date: Mon, 16 Sep 2002 22:41:46 +0800 From: Leslie Jackson To: freebsd-hackers@freebsd.org Subject: Re: ioctl & SIOCDIFADDR Message-Id: <20020916224146.52e31c8c.int@softhome.net> In-Reply-To: <20020916085445.GA11460@spc.org> References: <20020916114315.7feb4bac.int@softhome.net> <20020916085445.GA11460@spc.org> X-Mailer: Sylpheed version 0.7.6 (GTK+ 1.2.10; i386-portbld-freebsd4.6) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 16 Sep 2002 09:54:45 +0100 Bruce M Simpson wrote: > On Mon, Sep 16, 2002 at 11:43:15AM +0800, Leslie Jackson wrote: > > I can specify an specific IP, say, "192.168.0.2", for SIOCDIFADDR to > > delete. But how can i specify this "default address"(said in the > > netintor(4)) to"delete the first address of the interface"? > > Try 0.0.0.0. (aka INADDR_ANY). > > BMS Failed using that way. (SIOCDIFADDR: can't assign requested addressed) The following is the simple code: /* * Delete an IP address of lo0 */ #include #include #include #include #include #include #include #include int main(void) { int s; struct ifaliasreq ifaliasreq; struct sockaddr_in *in; s = socket(PF_INET, SOCK_STREAM, 0); memset(&ifaliasreq, 0, sizeof(ifaliasreq)); strncpy(ifaliasreq.ifra_name, "lo0", sizeof(ifaliasreq.ifra_name)); in = (struct sockaddr_in *) &ifaliasreq.ifra_addr; in->sin_family = AF_INET; in->sin_len = sizeof(ifaliasreq.ifra_addr); /* * if i use "0.0.0.0" or INADDR_ANY", i'd get this error: * SIOCDIFADDR: can't assign requested addressed * * in->sin_addr.s_addr = htonl(INADDR_ANY); * in->sin_addr.s_addr = inet_addr("0.0.0.0"); */ /* okay if using a specific IP */ in->sin_addr.s_addr = inet_addr("127.0.0.1"); if (ioctl(s, SIOCDIFADDR, &ifaliasreq) == -1) perror("SIOCDIFADDR"); return (0); } Something missed or wrong? Thanks for any insights. -- Leslie Jackson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 9: 7:49 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2674437B400 for ; Mon, 16 Sep 2002 09:07:46 -0700 (PDT) Received: from kraid.nerim.net (kraid.nerim.net [62.4.16.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 886A443E42 for ; Mon, 16 Sep 2002 09:07:45 -0700 (PDT) (envelope-from meadele@nerim.net) Received: from nerim.net (bzero.net [80.65.224.39]) by kraid.nerim.net (Postfix) with ESMTP id F036B40FC2; Mon, 16 Sep 2002 17:39:11 +0200 (CEST) Message-ID: <3D862817.8070007@nerim.net> Date: Mon, 16 Sep 2002 18:51:03 +0000 From: mm User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.9) Gecko/20020312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Leslie Jackson Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: ioctl & SIOCDIFADDR References: <20020916114315.7feb4bac.int@softhome.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Leslie Jackson wrote: [..snip..] > I can specify an specific IP, say, "192.168.0.2", for SIOCDIFADDR to delete. > But how can i specify this "default address"(said in the netintor(4)) to > "delete the first address of the interface"? Hello, You can try to request the first address of the specified interface via ioctl call. #include #include #include #include #include #include #include #include #include /* * retrieve the FIRST address of the specified interface * you may want to directly merge it with your code. */ in_addr_t get_ifaddr(char *ifname) { int s; struct ifreq ifs; ifs.ifr_addr.sa_family = AF_INET; s = socket(ifs.ifr_addr.sa_family, SOCK_DGRAM, 0); if( s < 0 ) { perror("get_ifaddr(): socket()"); exit(1); } strncpy(ifs.ifr_name, ifname, sizeof(ifs.ifr_name)); if( ioctl(s, OSIOCGIFADDR, &ifs) == -1 ) { perror("get_ifaddr(): ioctl()"); exit(1); } close(s); return ((struct sockaddr_in *)&(ifs.ifr_addr))->sin_addr.s_addr; } /* your code */ int main(int argc, char *argv[]) { int s; struct ifaliasreq ifaliasreq; struct sockaddr_in *in; if( argc != 2 ) { fprintf(stderr, "%s ifname\n", argv[0]); return 1; } s = socket(PF_INET, SOCK_STREAM, 0); if( s == -1 ) { perror("socket()"); return 1; } memset(&ifaliasreq, 0, sizeof(ifaliasreq)); strncpy(ifaliasreq.ifra_name, argv[1], sizeof(ifaliasreq.ifra_name)); in = (struct sockaddr_in *) &ifaliasreq.ifra_addr; in->sin_family = AF_INET; in->sin_len = sizeof(ifaliasreq.ifra_addr); /* * let get_ifaddr() find the address of the interface */ in->sin_addr.s_addr = get_ifaddr(ifaliasreq.ifra_name); if( ioctl(s, SIOCDIFADDR, &ifaliasreq) == -1 ) { perror("SIOCDIFADDR"); return 1; } return 0; } bash-2.05# ifconfig rl0 rl0: flags=8843 mtu 1500 inet6 fe80::250:fcff:fe22:dc01%rl0 prefixlen 64 scopeid 0x1 inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 inet 192.168.0.10 netmask 0xffffffff broadcast 192.168.0.10 inet 192.168.0.11 netmask 0xffffffff broadcast 192.168.0.11 ether 00:50:fc:22:dc:01 media: Ethernet 10baseT/UTP status: no carrier bash-2.05# ./test rl0 bash-2.05# ifconfig rl0 rl0: flags=8843 mtu 1500 inet6 fe80::250:fcff:fe22:dc01%rl0 prefixlen 64 scopeid 0x1 inet 192.168.0.10 netmask 0xffffffff broadcast 192.168.0.10 inet 192.168.0.11 netmask 0xffffffff broadcast 192.168.0.11 ether 00:50:fc:22:dc:01 media: Ethernet 10baseT/UTP status: no carrier the first rl0 address (192.168.0.1) has been removed. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 9: 7:53 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D940437B400 for ; Mon, 16 Sep 2002 09:07:51 -0700 (PDT) Received: from insomnia.spc.org (insomnia.spc.org [195.224.94.183]) by mx1.FreeBSD.org (Postfix) with SMTP id B7FDB43E42 for ; Mon, 16 Sep 2002 09:07:50 -0700 (PDT) (envelope-from bms@insomnia.spc.org) Received: (qmail 17699 invoked by uid 1031); 16 Sep 2002 16:05:05 -0000 Date: Mon, 16 Sep 2002 17:05:05 +0100 From: Bruce M Simpson To: Leslie Jackson Cc: freebsd-hackers@freebsd.org Subject: Re: ioctl & SIOCDIFADDR Message-ID: <20020916160505.GB11460@spc.org> Mail-Followup-To: Bruce M Simpson , Leslie Jackson , freebsd-hackers@freebsd.org References: <20020916114315.7feb4bac.int@softhome.net> <20020916085445.GA11460@spc.org> <20020916224146.52e31c8c.int@softhome.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020916224146.52e31c8c.int@softhome.net> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Sep 16, 2002 at 10:41:46PM +0800, Leslie Jackson wrote: > > Try 0.0.0.0. (aka INADDR_ANY). > Failed using that way. (SIOCDIFADDR: can't assign requested addressed) My bad... a hasty answer to a hastily read question. Quick answer:- man 4 networking. Long answer:- Your best option is probably to issue an SIOCGIFCONF and walk the list. This should give you the default addresses assigned to each interface. If you need to look at aliases, use SIOCAIFCONF for the interface you're interested in. Look at netinet/in.c:in_control(). SIOCSIFADDR is now deprecated, so in a way you were right to watch what ifconfig was doing. If you need code examples, have a look in /usr/ports/mbone as some programs which need to determine multicast capabilities of each configured interface will have to walk the ifreq/ifconf list. You'll need to play an elastic buffer game where you specify the size of the chunk of memory you've allocated for the ifconf array, and if it's bigger, reallocate it and ask again. Also if portability is an issue note that Solaris and Linux do it slightly differently now. We haven't picked up that change yet (...scribbles in TODO list..) but what it boils down to is this:- instead of playing elastic buffer games to get the size of the list, you just ask how big the list is. BMS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 12: 2:31 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 21D1837B400 for ; Mon, 16 Sep 2002 12:02:30 -0700 (PDT) Received: from mail.speakeasy.net (mail13.speakeasy.net [216.254.0.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id B137543E4A for ; Mon, 16 Sep 2002 12:02:29 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 10681 invoked from network); 16 Sep 2002 19:02:27 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail13.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 16 Sep 2002 19:02:27 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g8GJ2PBv054940; Mon, 16 Sep 2002 15:02:26 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020913192553.S91245-100000@carver.gumbysoft.com> Date: Mon, 16 Sep 2002 15:02:05 -0400 (EDT) From: John Baldwin To: Doug White Subject: Re: AP #1 (PHY# 6) failed! Cc: Brooks Davis , freebsd-hackers@FreeBSD.ORG, Danny Braniss Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 14-Sep-2002 Doug White wrote: > On Fri, 13 Sep 2002, John Baldwin wrote: > >> Hmm, ok. Someone mentioned something about ACPI so let me sit down and >> right an ACPI MADT table parser and try to let you use that to compare >> it to the mptable. > > Cool. I can test a patch for you too over here. If you have p4 setup, you can grab the new version of acpidump from //depot/users/jhb/madt/usr.sbin/acpi/acpidump. It doesn't have the same output format as mptable though, takes a bit more work to grok the results. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 12: 2:34 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCE7537B400 for ; Mon, 16 Sep 2002 12:02:31 -0700 (PDT) Received: from mail.speakeasy.net (mail13.speakeasy.net [216.254.0.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67B3E43E6E for ; Mon, 16 Sep 2002 12:02:31 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 10744 invoked from network); 16 Sep 2002 19:02:30 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail13.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 16 Sep 2002 19:02:30 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g8GJ2TBv054946; Mon, 16 Sep 2002 15:02:29 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <1032051059.35814.2.camel@panda.FreeBSDsystems.COM> Date: Mon, 16 Sep 2002 15:02:09 -0400 (EDT) From: John Baldwin To: Paul James Subject: Re: Dell 2650 SMP perf question Cc: freebsd-hackers@freebsd.org, hackers@d.sparks.net, Doug White Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 15-Sep-2002 Paul James wrote: > Hi, > I was told that this has something to do with the scheduler and, it is > best to wait until the work on the scheduler is complete. No, I don't know what it is yet, but the "problem" is that when the SMP code tries to wake up the second processor, the second processor doesn't get to the right place to tell the first one that it started successfully. It may be that it isn't starting, or it may be that it is starting but is going off into lala land. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 15:46:45 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C85FA37B400 for ; Mon, 16 Sep 2002 15:46:44 -0700 (PDT) Received: from carver.gumbysoft.com (carver.gumbysoft.com [66.220.23.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FCB443E81 for ; Mon, 16 Sep 2002 15:46:44 -0700 (PDT) (envelope-from dwhite@gumbysoft.com) Received: by carver.gumbysoft.com (Postfix, from userid 1000) id 5F8CB72FCC; Mon, 16 Sep 2002 15:45:13 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by carver.gumbysoft.com (Postfix) with ESMTP id 5C97172FC5; Mon, 16 Sep 2002 15:45:13 -0700 (PDT) Date: Mon, 16 Sep 2002 15:45:13 -0700 (PDT) From: Doug White To: Dmitriy Fitisov Cc: freebsd-hackers@FreeBSD.org Subject: Re: POSIX message queue In-Reply-To: Message-ID: <20020916154508.J19620-100000@carver.gumbysoft.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 15 Sep 2002, Dmitriy Fitisov wrote: > Hi, > I cannot find implementation of POSIX message queues > (mq_open, mq_xxx, ...). Even though there is a message header > mqueue.h ld cannot find a library. > > Am I looking in wrong place? Did you check libc? :) -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 16: 9:13 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DC8837B401 for ; Mon, 16 Sep 2002 16:08:55 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15E4343E6E for ; Mon, 16 Sep 2002 16:08:55 -0700 (PDT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id E319DAE22C; Mon, 16 Sep 2002 16:08:54 -0700 (PDT) Date: Mon, 16 Sep 2002 16:08:54 -0700 From: Alfred Perlstein To: hackers@freebsd.org Subject: sem_* API Message-ID: <20020916230854.GA86737@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I got sort of bored so I wrote a kernel version of the POSIX sem_* functions so that we can support sem_open() and sem_init() when 'pshared' is set to true. Basically this is posix semaphores that can be used between processes. I haven't tested it as of yet (but I will be soon), here's the delta for it. Does anyone know a test suite for this API? Index: include/Makefile =================================================================== RCS file: /home/ncvs/src/include/Makefile,v retrieving revision 1.175 diff -u -r1.175 Makefile --- include/Makefile 8 Aug 2002 04:50:36 -0000 1.175 +++ include/Makefile 16 Sep 2002 19:07:38 -0000 @@ -27,7 +27,7 @@ MHDRS= float.h floatingpoint.h stdarg.h varargs.h # posix4/aio.h conflicts with dysons and isn't installed: -PHDRS= mqueue.h sched.h semaphore.h # aio.h +PHDRS= mqueue.h sched.h semaphore.h _semaphore.h # aio.h LHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdint.h syslog.h \ termios.h ucontext.h Index: lib/libpthread/thread/thr_private.h =================================================================== RCS file: /home/ncvs/src/lib/libpthread/thread/thr_private.h,v retrieving revision 1.74 diff -u -r1.74 thr_private.h --- lib/libpthread/thread/thr_private.h 16 Sep 2002 08:45:35 -0000 1.74 +++ lib/libpthread/thread/thr_private.h 16 Sep 2002 22:41:20 -0000 @@ -60,6 +60,7 @@ #include #include #include +#include /* * Define machine dependent macros to get and set the stack pointer @@ -369,6 +370,11 @@ pthread_cond_t gtzero; u_int32_t count; u_int32_t nwaiters; +#define SEM_USER (NULL) + semid_t semid; /* semaphore id if kernel (shared) semaphore */ + int syssem; /* 1 if kernel (shared) semaphore */ + LIST_ENTRY(sem) entry; + sem_t *backpointer; }; /* Index: lib/libpthread/thread/thr_sem.c =================================================================== RCS file: /home/ncvs/src/lib/libpthread/thread/thr_sem.c,v retrieving revision 1.11 diff -u -r1.11 thr_sem.c --- lib/libpthread/thread/thr_sem.c 16 Sep 2002 08:45:36 -0000 1.11 +++ lib/libpthread/thread/thr_sem.c 16 Sep 2002 22:48:36 -0000 @@ -31,7 +31,9 @@ #include #include +#include #include +#include #include #include "thr_private.h" @@ -52,63 +54,86 @@ __weak_reference(_sem_post, sem_post); __weak_reference(_sem_getvalue, sem_getvalue); +static sem_t sem_alloc(unsigned int value, semid_t semid, int system_sem); +static void sem_free(sem_t sem); -int -_sem_init(sem_t *sem, int pshared, unsigned int value) +static void +sem_free(sem_t sem) { - int retval; - /* - * Range check the arguments. - */ - if (pshared != 0) { - /* - * The user wants a semaphore that can be shared among - * processes, which this implementation can't do. Sounds like a - * permissions problem to me (yeah right). - */ - errno = EPERM; - retval = -1; - goto RETURN; - } + pthread_mutex_destroy(&sem->lock); + pthread_cond_destroy(&sem->gtzero); + sem->magic = 0; + + free(sem); +} + +static sem_t +sem_alloc(unsigned int value, semid_t semid, int system_sem) +{ + sem_t sem; if (value > SEM_VALUE_MAX) { errno = EINVAL; - retval = -1; - goto RETURN; + return (NULL); } - *sem = (sem_t)malloc(sizeof(struct sem)); - if (*sem == NULL) { + sem = (sem_t)malloc(sizeof(struct sem)); + if (sem == NULL) { errno = ENOSPC; - retval = -1; - goto RETURN; + return (NULL); } /* * Initialize the semaphore. */ - if (pthread_mutex_init(&(*sem)->lock, NULL) != 0) { - free(*sem); + if (pthread_mutex_init(&sem->lock, NULL) != 0) { + free(sem); errno = ENOSPC; - retval = -1; - goto RETURN; + return (NULL); } - if (pthread_cond_init(&(*sem)->gtzero, NULL) != 0) { - pthread_mutex_destroy(&(*sem)->lock); - free(*sem); + if (pthread_cond_init(&sem->gtzero, NULL) != 0) { + pthread_mutex_destroy(&sem->lock); + free(sem); errno = ENOSPC; - retval = -1; - goto RETURN; + return (NULL); } - (*sem)->count = (u_int32_t)value; - (*sem)->nwaiters = 0; - (*sem)->magic = SEM_MAGIC; + sem->count = (u_int32_t)value; + sem->nwaiters = 0; + sem->magic = SEM_MAGIC; + sem->semid = semid; + sem->syssem = system_sem; + return (sem); +} - retval = 0; +int +_sem_init(sem_t *sem, int pshared, unsigned int value) +{ + int retval, got_system_sem; + semid_t semid; + + got_system_sem = 0; + semid = SEM_USER; + /* + * Range check the arguments. + */ + if (pshared != 0) { + retval = ksem_init(&semid, value); + if (retval == -1) + goto RETURN; + got_system_sem = 1; + } + + (*sem) = sem_alloc(value, semid, got_system_sem); + if ((*sem) == NULL) + retval = -1; + else + retval = 0; RETURN: + if (retval != 0 && got_system_sem) + ksem_destroy(semid); return retval; } @@ -119,46 +144,121 @@ _SEM_CHECK_VALIDITY(sem); - /* Make sure there are no waiters. */ pthread_mutex_lock(&(*sem)->lock); - if ((*sem)->nwaiters > 0) { + /* + * If this is a system semaphore let the kernel track it otherwise + * make sure there are no waiters. + */ + if ((*sem)->syssem != 0) { + retval = ksem_destroy((*sem)->semid); + if (retval == -1) { + pthread_mutex_unlock(&(*sem)->lock); + goto RETURN; + } + } else if ((*sem)->nwaiters > 0) { pthread_mutex_unlock(&(*sem)->lock); errno = EBUSY; retval = -1; goto RETURN; } pthread_mutex_unlock(&(*sem)->lock); - - pthread_mutex_destroy(&(*sem)->lock); - pthread_cond_destroy(&(*sem)->gtzero); - (*sem)->magic = 0; - free(*sem); + sem_free(*sem); retval = 0; RETURN: return retval; } +LIST_HEAD(, sem) named_sems = LIST_HEAD_INITIALIZER(&named_sems); +pthread_mutex_t named_sems_mtx = PTHREAD_MUTEX_INITIALIZER; + sem_t * _sem_open(const char *name, int oflag, ...) { - errno = ENOSYS; - return SEM_FAILED; + sem_t *sem; + sem_t s; + semid_t semid; + mode_t mode; + unsigned int value; + + mode = 0; + value = 0; + + if ((oflag & O_CREAT) != 0) { + va_list ap; + + va_start(ap, oflag); + mode = va_arg(ap, unsigned long); + value = va_arg(ap, unsigned int); + va_end(ap); + } + /* + * we can be lazy and let the kernel handle the "oflag", + * we'll just merge duplicate IDs into our list. + */ + if (ksem_open(&semid, name, oflag, mode, value) == -1) + return (SEM_FAILED); + /* + * search for a duplicate ID, we must return the same sem_t * + * if we locate one. + */ + pthread_mutex_lock(&named_sems_mtx); + LIST_FOREACH(s, &named_sems, entry) { + if (s->semid == semid) { + pthread_mutex_unlock(&named_sems_mtx); + return (s->backpointer); + } + } + sem = (sem_t *)malloc(sizeof(*sem)); + if (sem == NULL) + goto err; + *sem = sem_alloc(value, semid, 1); + if ((*sem) == NULL) + goto err; + pthread_mutex_unlock(&named_sems_mtx); + (*sem)->backpointer = sem; + return (sem); +err: + pthread_mutex_unlock(&named_sems_mtx); + ksem_close(semid); + if (sem != NULL) { + if (*sem != NULL) + sem_free(*sem); + else + errno = ENOSPC; + free(sem); + } else { + errno = ENOSPC; + } + return (SEM_FAILED); } int _sem_close(sem_t *sem) { - errno = ENOSYS; - return -1; + + if ((*sem)->syssem == 0) { + errno = EINVAL; + return (-1); + } + pthread_mutex_lock(&named_sems_mtx); + if (ksem_close((*sem)->semid) == -1) { + pthread_mutex_unlock(&named_sems_mtx); + return (-1); + } + LIST_REMOVE((*sem), entry); + pthread_mutex_unlock(&named_sems_mtx); + sem_free(*sem); + free(sem); + return (0); } int _sem_unlink(const char *name) { - errno = ENOSYS; - return -1; + + return (ksem_unlink(name)); } int @@ -170,6 +270,11 @@ _SEM_CHECK_VALIDITY(sem); + if ((*sem)->syssem != 0) { + retval = ksem_wait((*sem)->semid); + goto RETURN; + } + pthread_mutex_lock(&(*sem)->lock); while ((*sem)->count == 0) { @@ -194,6 +299,11 @@ _SEM_CHECK_VALIDITY(sem); + if ((*sem)->syssem != 0) { + retval = ksem_trywait((*sem)->semid); + goto RETURN; + } + pthread_mutex_lock(&(*sem)->lock); if ((*sem)->count > 0) { @@ -217,6 +327,11 @@ _SEM_CHECK_VALIDITY(sem); + if ((*sem)->syssem != 0) { + retval = ksem_post((*sem)->semid); + goto RETURN; + } + /* * sem_post() is required to be safe to call from within signal * handlers. Thus, we must defer signals. @@ -243,6 +358,11 @@ int retval; _SEM_CHECK_VALIDITY(sem); + + if ((*sem)->syssem != 0) { + retval = ksem_getvalue((*sem)->semid, sval); + goto RETURN; + } pthread_mutex_lock(&(*sem)->lock); *sval = (int)(*sem)->count; Index: sys/conf/NOTES =================================================================== RCS file: /home/ncvs/src/sys/conf/NOTES,v retrieving revision 1.1075 diff -u -r1.1075 NOTES --- sys/conf/NOTES 11 Sep 2002 05:33:09 -0000 1.1075 +++ sys/conf/NOTES 16 Sep 2002 23:00:26 -0000 @@ -746,6 +746,7 @@ options P1003_1B options _KPOSIX_PRIORITY_SCHEDULING options _KPOSIX_VERSION=199309L +options P1003_1B_SEMAPHORES ##################################################################### Index: sys/conf/files =================================================================== RCS file: /home/ncvs/src/sys/conf/files,v retrieving revision 1.698 diff -u -r1.698 files --- sys/conf/files 16 Sep 2002 04:13:48 -0000 1.698 +++ sys/conf/files 16 Sep 2002 16:37:48 -0000 @@ -1423,3 +1423,4 @@ vm/uma_core.c standard vm/uma_dbg.c standard vm/vnode_pager.c standard +kern/uipc_sem.c standard Index: sys/conf/options =================================================================== RCS file: /home/ncvs/src/sys/conf/options,v retrieving revision 1.348 diff -u -r1.348 options --- sys/conf/options 7 Sep 2002 22:07:10 -0000 1.348 +++ sys/conf/options 16 Sep 2002 18:37:11 -0000 @@ -132,6 +132,7 @@ P1003_1B opt_posix.h _KPOSIX_PRIORITY_SCHEDULING opt_posix.h _KPOSIX_VERSION opt_posix.h +P1003_1B_SEMAPHORES opt_posix.h ##################################################################### # SECURITY POLICY PARAMETERS Index: sys/kern/init_sysent.c =================================================================== RCS file: /home/ncvs/src/sys/kern/init_sysent.c,v retrieving revision 1.131 diff -u -r1.131 init_sysent.c --- sys/kern/init_sysent.c 19 Aug 2002 20:02:29 -0000 1.131 +++ sys/kern/init_sysent.c 16 Sep 2002 17:25:15 -0000 @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/init_sysent.c,v 1.131 2002/08/19 20:02:29 rwatson Exp $ + * $FreeBSD$ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.121 2002/08/19 20:01:31 rwatson Exp */ @@ -423,4 +423,18 @@ { AS(uuidgen_args), (sy_call_t *)uuidgen }, /* 392 = uuidgen */ { SYF_MPSAFE | AS(sendfile_args), (sy_call_t *)sendfile }, /* 393 = sendfile */ { SYF_MPSAFE | AS(mac_syscall_args), (sy_call_t *)mac_syscall }, /* 394 = mac_syscall */ + { 0, (sy_call_t *)nosys }, /* 395 = nosys */ + { 0, (sy_call_t *)nosys }, /* 396 = nosys */ + { 0, (sy_call_t *)nosys }, /* 397 = nosys */ + { 0, (sy_call_t *)nosys }, /* 398 = nosys */ + { 0, (sy_call_t *)nosys }, /* 399 = nosys */ + { SYF_MPSAFE | AS(ksem_close_args), (sy_call_t *)lkmressys }, /* 400 = ksem_close */ + { SYF_MPSAFE | AS(ksem_post_args), (sy_call_t *)lkmressys }, /* 401 = ksem_post */ + { SYF_MPSAFE | AS(ksem_wait_args), (sy_call_t *)lkmressys }, /* 402 = ksem_wait */ + { SYF_MPSAFE | AS(ksem_trywait_args), (sy_call_t *)lkmressys }, /* 403 = ksem_trywait */ + { SYF_MPSAFE | AS(ksem_init_args), (sy_call_t *)lkmressys }, /* 404 = ksem_init */ + { SYF_MPSAFE | AS(ksem_open_args), (sy_call_t *)lkmressys }, /* 405 = ksem_open */ + { SYF_MPSAFE | AS(ksem_unlink_args), (sy_call_t *)lkmressys }, /* 406 = ksem_unlink */ + { SYF_MPSAFE | AS(ksem_getvalue_args), (sy_call_t *)lkmressys }, /* 407 = ksem_getvalue */ + { SYF_MPSAFE | AS(ksem_destroy_args), (sy_call_t *)lkmressys }, /* 408 = ksem_destroy */ }; Index: sys/kern/makesyscalls.sh =================================================================== RCS file: /home/ncvs/src/sys/kern/makesyscalls.sh,v retrieving revision 1.56 diff -u -r1.56 makesyscalls.sh --- sys/kern/makesyscalls.sh 12 Jul 2002 06:38:34 -0000 1.56 +++ sys/kern/makesyscalls.sh 16 Sep 2002 05:59:59 -0000 @@ -115,8 +115,9 @@ printf " * created from%s\n */\n\n", $0 > sysarg printf "#ifndef %s\n", sysproto_h > sysarg printf "#define\t%s\n\n", sysproto_h > sysarg - printf "#include \n\n" > sysarg - printf "#include \n\n" > sysarg + printf "#include \n" > sysarg + printf "#include \n" > sysarg + printf "#include \n\n" > sysarg printf "struct proc;\n\n" > sysarg printf "struct thread;\n\n" > sysarg printf "#define\tPAD_(t)\t(sizeof(register_t) <= sizeof(t) ? \\\n" > sysarg Index: sys/kern/syscalls.c =================================================================== RCS file: /home/ncvs/src/sys/kern/syscalls.c,v retrieving revision 1.117 diff -u -r1.117 syscalls.c --- sys/kern/syscalls.c 19 Aug 2002 20:02:29 -0000 1.117 +++ sys/kern/syscalls.c 16 Sep 2002 17:25:15 -0000 @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/syscalls.c,v 1.117 2002/08/19 20:02:29 rwatson Exp $ + * $FreeBSD$ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.121 2002/08/19 20:01:31 rwatson Exp */ @@ -402,4 +402,18 @@ "uuidgen", /* 392 = uuidgen */ "sendfile", /* 393 = sendfile */ "mac_syscall", /* 394 = mac_syscall */ + "#395", /* 395 = nosys */ + "#396", /* 396 = nosys */ + "#397", /* 397 = nosys */ + "#398", /* 398 = nosys */ + "#399", /* 399 = nosys */ + "ksem_close", /* 400 = ksem_close */ + "ksem_post", /* 401 = ksem_post */ + "ksem_wait", /* 402 = ksem_wait */ + "ksem_trywait", /* 403 = ksem_trywait */ + "ksem_init", /* 404 = ksem_init */ + "ksem_open", /* 405 = ksem_open */ + "ksem_unlink", /* 406 = ksem_unlink */ + "ksem_getvalue", /* 407 = ksem_getvalue */ + "ksem_destroy", /* 408 = ksem_destroy */ }; Index: sys/kern/syscalls.master =================================================================== RCS file: /home/ncvs/src/sys/kern/syscalls.master,v retrieving revision 1.121 diff -u -r1.121 syscalls.master --- sys/kern/syscalls.master 19 Aug 2002 20:01:31 -0000 1.121 +++ sys/kern/syscalls.master 16 Sep 2002 17:25:09 -0000 @@ -569,3 +569,18 @@ struct sf_hdtr *hdtr, off_t *sbytes, int flags); } 394 MSTD BSD { int mac_syscall(const char *policy, int call, \ void *arg); } +395 UNIMPL NOHIDE nosys +396 UNIMPL NOHIDE nosys +397 UNIMPL NOHIDE nosys +398 UNIMPL NOHIDE nosys +399 UNIMPL NOHIDE nosys +400 MNOSTD BSD { int ksem_close(semid_t id); } +401 MNOSTD BSD { int ksem_post(semid_t id); } +402 MNOSTD BSD { int ksem_wait(semid_t id); } +403 MNOSTD BSD { int ksem_trywait(semid_t id); } +404 MNOSTD BSD { int ksem_init(semid_t *idp, unsigned int value); } +405 MNOSTD BSD { int ksem_open(semid_t *idp, const char *name, \ + int oflag, mode_t mode, unsigned int value); } +406 MNOSTD BSD { int ksem_unlink(const char *name); } +407 MNOSTD BSD { int ksem_getvalue(semid_t id, int *val); } +408 MNOSTD BSD { int ksem_destroy(semid_t id); } cvs diff: sys/kern/uipc_sem.c is a new entry, no comparison available Index: sys/modules/Makefile =================================================================== RCS file: /home/ncvs/src/sys/modules/Makefile,v retrieving revision 1.257 diff -u -r1.257 Makefile --- sys/modules/Makefile 16 Sep 2002 08:32:48 -0000 1.257 +++ sys/modules/Makefile 16 Sep 2002 18:39:19 -0000 @@ -69,6 +69,7 @@ pcn \ plip \ portalfs \ + posix4 \ ppbus \ ppi \ pps \ cvs diff: sys/modules/posix4/Makefile is a new entry, no comparison available cvs diff: sys/modules/posix4/sem/Makefile is a new entry, no comparison available cvs diff: sys/posix4/_semaphore.h is a new entry, no comparison available Index: sys/posix4/posix4.h =================================================================== RCS file: /home/ncvs/src/sys/posix4/posix4.h,v retrieving revision 1.8 diff -u -r1.8 posix4.h --- sys/posix4/posix4.h 19 Mar 2002 22:18:09 -0000 1.8 +++ sys/posix4/posix4.h 16 Sep 2002 17:50:58 -0000 @@ -64,6 +64,7 @@ int p31b_proc(struct proc *, pid_t, struct proc **); void p31b_setcfg(int, int); +int p31b_getcfg(int); #ifdef _KPOSIX_PRIORITY_SCHEDULING Index: sys/posix4/posix4_mib.c =================================================================== RCS file: /home/ncvs/src/sys/posix4/posix4_mib.c,v retrieving revision 1.4 diff -u -r1.4 posix4_mib.c --- sys/posix4/posix4_mib.c 22 Apr 2000 15:13:06 -0000 1.4 +++ sys/posix4/posix4_mib.c 16 Sep 2002 17:49:57 -0000 @@ -92,10 +92,21 @@ /* p31b_setcfg: Set the configuration */ -void p31b_setcfg(int num, int value) +void +p31b_setcfg(int num, int value) { + if (num >= 1 && num < CTL_P1003_1B_MAXID) facility[num - 1] = value; +} + +int +p31b_getcfg(int num) +{ + + if (num >= 1 && num < CTL_P1003_1B_MAXID) + return (facility[num - 1]); + return (0); } /* Index: sys/sys/syscall.h =================================================================== RCS file: /home/ncvs/src/sys/sys/syscall.h,v retrieving revision 1.116 diff -u -r1.116 syscall.h --- sys/sys/syscall.h 19 Aug 2002 20:02:29 -0000 1.116 +++ sys/sys/syscall.h 16 Sep 2002 17:25:15 -0000 @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/sys/syscall.h,v 1.116 2002/08/19 20:02:29 rwatson Exp $ + * $FreeBSD$ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.121 2002/08/19 20:01:31 rwatson Exp */ @@ -308,4 +308,13 @@ #define SYS_uuidgen 392 #define SYS_sendfile 393 #define SYS_mac_syscall 394 -#define SYS_MAXSYSCALL 395 +#define SYS_ksem_close 400 +#define SYS_ksem_post 401 +#define SYS_ksem_wait 402 +#define SYS_ksem_trywait 403 +#define SYS_ksem_init 404 +#define SYS_ksem_open 405 +#define SYS_ksem_unlink 406 +#define SYS_ksem_getvalue 407 +#define SYS_ksem_destroy 408 +#define SYS_MAXSYSCALL 409 Index: sys/sys/syscall.mk =================================================================== RCS file: /home/ncvs/src/sys/sys/syscall.mk,v retrieving revision 1.71 diff -u -r1.71 syscall.mk --- sys/sys/syscall.mk 19 Aug 2002 20:02:29 -0000 1.71 +++ sys/sys/syscall.mk 16 Sep 2002 17:25:15 -0000 @@ -1,6 +1,6 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. -# $FreeBSD: src/sys/sys/syscall.mk,v 1.71 2002/08/19 20:02:29 rwatson Exp $ +# $FreeBSD$ # created from FreeBSD: src/sys/kern/syscalls.master,v 1.121 2002/08/19 20:01:31 rwatson Exp MIASM = \ syscall.o \ @@ -256,4 +256,13 @@ lchflags.o \ uuidgen.o \ sendfile.o \ - mac_syscall.o + mac_syscall.o \ + ksem_close.o \ + ksem_post.o \ + ksem_wait.o \ + ksem_trywait.o \ + ksem_init.o \ + ksem_open.o \ + ksem_unlink.o \ + ksem_getvalue.o \ + ksem_destroy.o Index: sys/sys/sysproto.h =================================================================== RCS file: /home/ncvs/src/sys/sys/sysproto.h,v retrieving revision 1.108 diff -u -r1.108 sysproto.h --- sys/sys/sysproto.h 19 Aug 2002 20:02:29 -0000 1.108 +++ sys/sys/sysproto.h 16 Sep 2002 17:25:15 -0000 @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/sys/sysproto.h,v 1.108 2002/08/19 20:02:29 rwatson Exp $ + * $FreeBSD$ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.121 2002/08/19 20:01:31 rwatson Exp */ @@ -10,8 +10,8 @@ #define _SYS_SYSPROTO_H_ #include - #include +#include struct proc; @@ -1124,6 +1124,39 @@ char call_l_[PADL_(int)]; int call; char call_r_[PADR_(int)]; char arg_l_[PADL_(void *)]; void * arg; char arg_r_[PADR_(void *)]; }; +struct ksem_close_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; +}; +struct ksem_post_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; +}; +struct ksem_wait_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; +}; +struct ksem_trywait_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; +}; +struct ksem_init_args { + char idp_l_[PADL_(semid_t *)]; semid_t * idp; char idp_r_[PADR_(semid_t *)]; + char value_l_[PADL_(unsigned int)]; unsigned int value; char value_r_[PADR_(unsigned int)]; +}; +struct ksem_open_args { + char idp_l_[PADL_(semid_t *)]; semid_t * idp; char idp_r_[PADR_(semid_t *)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; + char oflag_l_[PADL_(int)]; int oflag; char oflag_r_[PADR_(int)]; + char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; + char value_l_[PADL_(unsigned int)]; unsigned int value; char value_r_[PADR_(unsigned int)]; +}; +struct ksem_unlink_args { + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; +}; +struct ksem_getvalue_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; + char val_l_[PADL_(int *)]; int * val; char val_r_[PADR_(int *)]; +}; +struct ksem_destroy_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_exit(struct thread *, struct sys_exit_args *); int fork(struct thread *, struct fork_args *); @@ -1377,6 +1410,15 @@ int uuidgen(struct thread *, struct uuidgen_args *); int sendfile(struct thread *, struct sendfile_args *); int mac_syscall(struct thread *, struct mac_syscall_args *); +int ksem_close(struct thread *, struct ksem_close_args *); +int ksem_post(struct thread *, struct ksem_post_args *); +int ksem_wait(struct thread *, struct ksem_wait_args *); +int ksem_trywait(struct thread *, struct ksem_trywait_args *); +int ksem_init(struct thread *, struct ksem_init_args *); +int ksem_open(struct thread *, struct ksem_open_args *); +int ksem_unlink(struct thread *, struct ksem_unlink_args *); +int ksem_getvalue(struct thread *, struct ksem_getvalue_args *); +int ksem_destroy(struct thread *, struct ksem_destroy_args *); #ifdef COMPAT_43 -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 16:11:42 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA01137B400 for ; Mon, 16 Sep 2002 16:11:41 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A70443E42 for ; Mon, 16 Sep 2002 16:11:41 -0700 (PDT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 77294AE275; Mon, 16 Sep 2002 16:11:41 -0700 (PDT) Date: Mon, 16 Sep 2002 16:11:41 -0700 From: Alfred Perlstein To: hackers@freebsd.org Subject: Re: sem_* API Message-ID: <20020916231141.GB86737@elvis.mu.org> References: <20020916230854.GA86737@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020916230854.GA86737@elvis.mu.org> User-Agent: Mutt/1.4i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Alfred Perlstein [020916 16:08] wrote: > I got sort of bored so I wrote a kernel version of the POSIX sem_* > functions so that we can support sem_open() and sem_init() when 'pshared' > is set to true. Basically this is posix semaphores that can be used > between processes. > > I haven't tested it as of yet (but I will be soon), here's the delta > for it. > > Does anyone know a test suite for this API? Of course actually including the _new_ files might help, the diff can be pulled from here: http://people.freebsd.org/~alfred/deltas/sem.diff.gz To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 16:41:29 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A63337B400 for ; Mon, 16 Sep 2002 16:41:28 -0700 (PDT) Received: from mail.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id B937B43E81 for ; Mon, 16 Sep 2002 16:41:27 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from localhost (eischen@localhost) by mail.pcnet.com (8.12.3/8.12.1) with ESMTP id g8GNfNp4012638; Mon, 16 Sep 2002 19:41:27 -0400 (EDT) Date: Mon, 16 Sep 2002 19:41:23 -0400 (EDT) From: Daniel Eischen To: Alfred Perlstein Cc: hackers@FreeBSD.ORG Subject: Re: sem_* API In-Reply-To: <20020916231141.GB86737@elvis.mu.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 16 Sep 2002, Alfred Perlstein wrote: > * Alfred Perlstein [020916 16:08] wrote: > > I got sort of bored so I wrote a kernel version of the POSIX sem_* > > functions so that we can support sem_open() and sem_init() when 'pshared' > > is set to true. Basically this is posix semaphores that can be used > > between processes. > > > > I haven't tested it as of yet (but I will be soon), here's the delta > > for it. > > > > Does anyone know a test suite for this API? > > Of course actually including the _new_ files might help, > the diff can be pulled from here: > > http://people.freebsd.org/~alfred/deltas/sem.diff.gz I'll only comment on the pthread portion. Please put objects in the beginning of the file before functions are implemented (named_sems and named_sems_mtx are declared between functions) to keep in style with the rest of the thread code. If those objects (named_sems and named_sems_mtx) need to be external then you must precede them with underscores. I think they can be static though. If you use mutexes internally (that the application doesn't know about) then you must use the _pthread_mutex_* variants (single underscore). The library treats these differently so that the thread will not be canceled or have a signal handler installed while holding one of these. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 17:34:54 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EAC9C37B400 for ; Mon, 16 Sep 2002 17:34:48 -0700 (PDT) Received: from smtp02.01.246.ne.jp (smtp02.01.246.ne.jp [210.253.192.40]) by mx1.FreeBSD.org (Postfix) with SMTP id E9BB343E75 for ; Mon, 16 Sep 2002 17:34:47 -0700 (PDT) (envelope-from jir@01.246.ne.jp) Received: (qmail 7824 invoked by alias); 17 Sep 2002 09:34:41 +0900 Received: (qmail 7711 invoked from network); 17 Sep 2002 09:34:37 +0900 Received: from unknown (HELO mebius2) (210.253.214.147) by tp01002 with SMTP; 17 Sep 2002 09:34:37 +0900 Message-ID: <011f01c25de0$ff1b1e60$0201a8c0@mebius2> From: "jir" To: , , , , "=?iso-2022-jp?B?GyRCQCQzJjtxS1wbKEI=?=" Cc: , , , , , , , References: <020601c25ca9$6c185e80$0201a8c0@mebius2> Subject: =?iso-2022-jp?B?UmU6IFtjaGFpbmEtcnVzaWFuOjAwNTFdIEZ3OiBbYXJndWU6NjQ=?= =?iso-2022-jp?B?NjddIFJlOiAbJEIkSSQmJDckRkY7TykkLDlxMUQkRyRKJC0bKEI=?= =?iso-2022-jp?B?GyRCJGMkSiRpJHMkTiRHJDkkKyEpGyhC?= Date: Tue, 17 Sep 2002 09:27:23 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jir =1B$B$G$9$&$&!#=1B(B =1B$B$*$O$h$*!"$_$JMM!#=1B(B : >=20 : > =1B$B9qL1$N7l@G$O;H$o$J$$$G$9$M!"0u:~$G$9!#=1B(B : > =1B$BF|6d$O6d9T$K$?$@$G:D8"$r;}$D!#@/I\$OF|6d$KIi:D$r;}$D!#=1B(B : > =1B$B6d9T$O!JF|6d$X$NIi:D!K?7;%$,A}$($k!J;`B"!K!#ITNI:D8"!)=1B(B : > =1B$B5!4XEj;q2H$,6d9T$KMB$1$F$"$k;fJ>$G9q:D$r9XF~!JDL2_0\F0!K=1B(B : > =1B$BF;O)8xCD$,9q$NJQ$o$j$K%a%s%F$d?75,$KF;O)$r7z@_2q =1B$BH/Cm!#5!4XEj;q2H$+$i7z@_2q =1B$B7z@_2q4k6H$XDL2_0\F0!#=1B(B :=20 : =1B$B$3$3$^$G$O#O#K$G$9!#=1B(B :=20 : > : > = =1B$B! : > = =1B$B3t>e>:!Z7t2qe>:! : > =1B$B! : > =1B$BJF9q@oAh$r;_$a$k!#=1B(B : > =1B$B$G$9!#=1B(B :=20 : =1B$B$H$3$m$,!"8x6&;v6H$r$d$C$F$$$?;~Be$b$=3D$&$O$J$i$J$+$C$?!#=1B(B 13=1B$BG/0LA0$^$G$O9bEY@.D9$O$&$^$/$$$C$F$$$^$7$?!#=1B(B =1B$B8x6&;v6H$r$d$C$F$$$?;~Be$b$=3D$&$O$J$i$J$+$C$?$O$=3D$N$H$-$^$G$OEv$F= $O$^$j$^$;$s$h!#=1B(B =1B$B$3$N4V$NE}7W$J$I$K$h$k$N$G$9$,!#$=3D$7$F$=3D$N$"$HF;O)$N8x6&Ej;q$rB>= $N8x6&Ej;q=1B(B =1B$B$h$j>/$J$/$7$^$7$?!J#1#3G/A0!K!"7P:Q$ODdBZ$7$^$7$?!"$G$^$?$=3D$NF;O)= Ej;q$,>/$J$$8x6&Ej;q$r=1B(B =1B$BA4BNE*$KA}$d$7$^$7$?!"$=3D$l$G$b7J5$$,$h$/$J$i$J$$$N$G!"@/I\$O@G<}$r= >e$2$k$K$O=1B(B =1B$BEZCOEj5!!"3t$d:D8"Ej5!$,@/I\$N<}F~$,>e$,$k$H!"%P%V%k$r$*$3$7$^$7$?!#= =1B(B Http://aladdin.cool.ne.jp/pc/ =1B$BF;O)$O2?$b$J$$86Ln$K:G=3Di$N%$%s%U%i$H$7$F:n$k$N$G$9$+$i!"?eF;!"EE5$= !"%,%9!"=1B(B =1B$BEEOC!"=3D;Bp!"9)>l!">&6H$H$D$:$$$F!"9q$N@G<}A}2C$K$J$k$^$G;~4V$,7|$+= $j=1B(B =1B$BL\$K8+$($F@V;z$,B?$$$N$G$9!#$G$b0lHV7P:Q@.D9$N4pAC$G$9!#$9$Y$F$OF;O)= =1B(B =1B$B$,:G=3Di$G$9!#0lHV3NH/9T;D9b$O%4!<%k%I$N;D9b$G$O$"$j$^$;$s!#=1B(B =1B$B@8;:%7%9%F%`$J$N$G$9!"!!!!!!!!@8;:%7%9%F%`#G#D#P!a;fJ>H/9T2DG=3D=1B(= B IT=1B$B$d3tEZCOEj5!$O=3Dc?h$J@8;:%7%9%F%`$G$"$j$^$;$s!#=1B(B =1B$B@8;:%7%9%F%`$NIU2C2ACM$G$9!#=1B(B =1B$BIU2C2ACM$OIm2C$5$l$k$b$N$,$"$C$F=3Di$a$F2ACM$,$G$k$N$O9b9;@8$b$o$+$j= $^$9!#=1B(B =1B$B$G$O!"E49]!"D9Bg;:6H$O=3D*$o$C$?!"$J$s$FGOB4Cf$r5/$3$7=1B(= B =1B$B$?$N$,!":#$N@8$-$F$$$kF|K\7P:Q$@$H;W$$$^$;$s$+!)=1B(B =1B$BL5BL$H;W$($kBg7zB$J*$O!"0];}$9$k$3$H$OBgJQ$+$b$7$l$^$;$s!"=1B(B =1B$B$G$bBNNO$r$D$1$k$K$O!"@8;:%7%9%F%`$r0];}$9$k$K$O$$$$$s$8$c$J$$$G$9$+= !)=1B(B : = =1B$BF;O)8xCD$N<}F~$h$j7z@_Hq$,9b$/$F@V;z$r=3DP$9$+$i!"$3$s$J%d%P%$7P:Q$O= =1B(B =1B$B2?EY$b8@$$$^$9$,2ql7z@_$O@V;z$G$9$h$M!"7z@_<+BNMx1W$r@8$^$J$$$7!#=1B(B =1B$B2TF0$7$F!"F;O)$,$G$-$F!"<~JU$K2?$+$r:n$C$F=3Di$a$FMx1W$N2DG=3D@-$,$G= $^$9$M!#=1B(B =1B$B8rDLNL$,>/$J$$$+$i@V;z$H$O!"$8$c$=3D$N>e$rAv$kJ*N.%H%i%C%/!">hMQe$2!"@G6b$G@V;z$r%U%)= %m!<$7$J$$$G=1B(B =1B$B$[$7$$$G$9$h$M!#$^$7$F@G6b$G$J$/!"G/<}=1B(B1=1B$B@iK|=1B(B=1B$B0J>e$= N$R$H$+$i$NFCJL@G$r:n@.=1B(B =1B$B$7$=3D$l$G:n$k$Y$-$G$9$h$M!"$^$7$FL14V$,LY$+$k$J$i:N;;$,$G$k$J$i$H$C= $/$K$_$s$J=1B(B =1B$B$d$C$F$^$9$h$M!"$3$s$J$N$,$o$+$i$J$$9qL1$NA*$V@/<#2H$O!)=1B(B =1B$B$"$[GO$9$k$H9qL1$,7Y2|$7$F!"0BA4$N0Y$KCy6b$9$k$+$i$G$9!#=1B(B =1B$BN"$rJV$;$PF;O)9);vL5$7$Ne$N=3DnL1$O=1B(BB/S=1B$BE*$KCy6b$O#0$b$7$/$O%^%$%J%9$G$9!#=1B= (B =1B$BBgBN9q:D$rCy6b$dDj4|!"3t$h$j;}$C$F$$$k9qL1$O3'L5$J$N$G$9!#=1B(B =1B$B$d$C$H8D?M8~$19q:D$,$G$-$?$G$7$g!"GK;:9q2H!"@V;z9q:D=1B(B =1B$B$HA{$0=3DnL1$O9q:D$rCN$i$J$$$GA{$$$G$$$k$N$O<+L@$G$9!#=1B(B =1B$B9qL1A4BN$N#3!s$NAj8_2q$KJQ$($?#1#3G/A0$+$i!"%P%V%k$r$d$C$F$+$i!"%G%U%l$r= =1B(B =1B$B$d$C$F$+$i!"IOIY$N:9$,3JCJ$KIU$$$?$,??CHq@\FO$/7A$G!#=1B(B :=20 : =1B$BDc=3DjF@CHq@G%<%m$^$?$O%^%$%J%9!"6b7tG[I[!*!*=1B(B =1B$B$=3D$&$=3D$&!"$=3D$l$,%P%V%k!"0-$$%?%$%W$N%$%s%U%l$J$N$G$9!#=1B(B =1B$B6b7tG[I[!*!*$@$1$G$O$@$a$G!"$=3D$l$GF;O)$rA49q$K:n$l$P!"2p8n;\@_=1B(= B =1B$B$r0u:~$7$F!J%G%U%lJ,$@$1!K$=3D$NDL9TNA$N$J$$@h$K$D$/$l$P$NH/A[$,$J$$= =1B(B =1B$BG=3DL5$7@/E^$,@$3&$rGKLG$5$9$N$G$9!#=1B(B =1B$BDc=3DjF@CHq@G%<%m$^$?$O%^%$%J%9$,$G$-$^$9$+!)2DG=3D$G$9$+!)= =1B(B =1B$B:#$O<:6HJ]81$r@$O@$,A}$d$7!"@83hJ]8n@$BS$rGOJ,%W!<%?%m%&$r4VH4$1F|6d!"<+G{7P:QAj$,:n$j=1B(B =1B$B$=3D$N>eDc=3DjF@CHq@G%<%m$^$?$O%^%$%J%9$r$d$k$N$G$9$+!)=1B(= B =1B$B$=3D$l$,9=3DB$2~3W$N4pK\$G!"@V;z9q:D$,8:$k860x$HBP:v$K$J$k$N$G$9$+!)= =1B(B =1B$B6d9T$NGO; Mon, 16 Sep 2002 18:09:40 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2C4443E65 for ; Mon, 16 Sep 2002 18:09:39 -0700 (PDT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id A6FEBAE165; Mon, 16 Sep 2002 18:09:39 -0700 (PDT) Date: Mon, 16 Sep 2002 18:09:39 -0700 From: Alfred Perlstein To: Daniel Eischen Cc: hackers@FreeBSD.ORG Subject: Re: sem_* API Message-ID: <20020917010939.GE86737@elvis.mu.org> References: <20020916231141.GB86737@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Daniel Eischen [020916 16:41] wrote: > On Mon, 16 Sep 2002, Alfred Perlstein wrote: > > > * Alfred Perlstein [020916 16:08] wrote: > > > I got sort of bored so I wrote a kernel version of the POSIX sem_* > > > functions so that we can support sem_open() and sem_init() when 'pshared' > > > is set to true. Basically this is posix semaphores that can be used > > > between processes. > > > > > > I haven't tested it as of yet (but I will be soon), here's the delta > > > for it. > > > > > > Does anyone know a test suite for this API? > > > > Of course actually including the _new_ files might help, > > the diff can be pulled from here: > > > > http://people.freebsd.org/~alfred/deltas/sem.diff.gz > > I'll only comment on the pthread portion. > > Please put objects in the beginning of the file before functions > are implemented (named_sems and named_sems_mtx are declared > between functions) to keep in style with the rest of the thread > code. > > If those objects (named_sems and named_sems_mtx) need to be external > then you must precede them with underscores. I think they can be > static though. > > If you use mutexes internally (that the application doesn't know > about) then you must use the _pthread_mutex_* variants (single > underscore). The library treats these differently so that the > thread will not be canceled or have a signal handler installed > while holding one of these. Thank you, I've applied all your suggested changes to my local tree. Yes, the structures are local, I neglected to 'staticize' them. I've also applied the delta to libc_r since Julian said I would need to do that to test it for now. Does it make sense for these to actually be in libc? This is because they can be used to inter-process syncronization, not just between threads... -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 18:20:10 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E6B137B400 for ; Mon, 16 Sep 2002 18:20:09 -0700 (PDT) Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE9FA43E72 for ; Mon, 16 Sep 2002 18:20:08 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020917012008.ZTXJ26805.rwcrmhc52.attbi.com@InterJet.elischer.org>; Tue, 17 Sep 2002 01:20:08 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id SAA97808; Mon, 16 Sep 2002 18:14:34 -0700 (PDT) Date: Mon, 16 Sep 2002 18:14:33 -0700 (PDT) From: Julian Elischer To: Alfred Perlstein Cc: Daniel Eischen , hackers@FreeBSD.ORG Subject: Re: sem_* API In-Reply-To: <20020917010939.GE86737@elvis.mu.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 16 Sep 2002, Alfred Perlstein wrote: > > Does it make sense for these to actually be in libc? This is > because they can be used to inter-process syncronization, not > just between threads... that depends on the standard.. is teh posix standard that defines these defining then outside the scope of threads? If so then they should be defined outside of threads. Is there a 'nonblocking' way of using these? because libc_r can not block of course.. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message From owner-freebsd-hackers Mon Sep 16 20:27:36 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1212337B400 for ; Mon, 16 Sep 2002 20:27:32 -0700 (PDT) Received: from anu.edu.au (anumail4.anu.edu.au [150.203.2.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0027E43E77 for ; Mon, 16 Sep 2002 20:27:30 -0700 (PDT) (envelope-from Gregory.Lane@anu.edu.au) Received: from nucl03.anu.edu.au (nucl03.anu.edu.au [150.203.19.120]) by anu.edu.au (8.12.3/8.12.3) with ESMTP id g8H3RTI8011834 for ; Tue, 17 Sep 2002 13:27:29 +1000 (EST) Received: from nucl03.anu.edu.au (localhost [127.0.0.1]) by nucl03.anu.edu.au (8.12.6/8.12.6) with ESMTP id g8H3RTsj000559 for ; Tue, 17 Sep 2002 13:27:29 +1000 (EST) (envelope-from gjl103@nucl03.anu.edu.au) Received: (from gjl103@localhost) by nucl03.anu.edu.au (8.12.6/8.12.6/Submit) id g8H3RSAL000558 for freebsd-hackers@FreeBSD.org; Tue, 17 Sep 2002 13:27:28 +1000 (EST) Date: Tue, 17 Sep 2002 13:27:28 +1000 From: Greg Lane To: freebsd-hackers@FreeBSD.org Subject: Kernel panic under heavy disk load - trace enclosed Message-ID: <20020917032728.GA458@nucl03.anu.edu.au> Reply-To: gregory.lane@anu.edu.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG G'day all, At some point a few months ago my workstation began to periodically crash. Eventually I realised it was when it was put under heavy disk load. Something like "make clean" in the ports tree, "rm -rf *" in a directory with many files, or (sometimes) a "make buildworld", would bring it down. Recently, I finally got around to compiling a debug kernel and saving a crash dump. In trying "rm -rf /usr/ports" I brought it down three times. Each trace is identical. One is shown below. A dmesg is attached also. I have been tracking stable on this machine since the beginning of 2001. The troubles started (I am guessing) April'ish this year (2002). Can anyone tell me if this hardware or a real bug? Is there anything else I could supply which would help in understanding the problem? Cheers, Greg (kgdb) where #0 dumpsys () at /usr/src/sys/kern/kern_shutdown.c:487 #1 0xc017caab in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:316 #2 0xc017cee9 in panic (fmt=0xc02c8300 "lockmgr: locking against myself") at /usr/src/sys/kern/kern_shutdown.c:595 #3 0xc017739b in lockmgr (lkp=0xcbccdeb8, flags=33620002, interlkp=0xc034e094, p=0xd2de45e0) at /usr/src/sys/kern/kern_lock.c:337 #4 0xc01a47e8 in getblk (vp=0xd391aa80, blkno=8519728, size=6144, slpflag=0, slptimeo=0) at /usr/src/sys/sys/buf.h:305 #5 0xc01a29a6 in bread (vp=0xd391aa80, blkno=8519728, size=6144, cred=0x0, bpp=0xd392ab30) at /usr/src/sys/kern/vfs_bio.c:508 #6 0xc0226c79 in ffs_freefile (pvp=0xd392ac54, ino=1032215, mode=33188) at /usr/src/sys/ufs/ffs/ffs_alloc.c:1592 #7 0xc022be24 in handle_workitem_freefile (freefile=0xc2143860) at /usr/src/sys/ufs/ffs/ffs_softdep.c:2913 #8 0xc02293c3 in process_worklist_item (matchmnt=0x0, flags=0) at /usr/src/sys/ufs/ffs/ffs_softdep.c:737 #9 0xc022922e in softdep_process_worklist (matchmnt=0x0) at /usr/src/sys/ufs/ffs/ffs_softdep.c:622 #10 0xc017c909 in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:261 #11 0xc017cee9 in panic (fmt=0xc02d8dc0 "ffs_blkfree: freeing free frag") at /usr/src/sys/kern/kern_shutdown.c:595 #12 0xc02269bf in ffs_blkfree (ip=0xd392ae0c, bno=8103, size=1024) at /usr/src/sys/ufs/ffs/ffs_alloc.c:1470 #13 0xc022af1e in handle_workitem_freeblocks (freeblks=0xc202df00) at /usr/src/sys/ufs/ffs/ffs_softdep.c:2146 #14 0xc022939b in process_worklist_item (matchmnt=0x0, flags=0) at /usr/src/sys/ufs/ffs/ffs_softdep.c:723 #15 0xc022922e in softdep_process_worklist (matchmnt=0x0) at /usr/src/sys/ufs/ffs/ffs_softdep.c:622 #16 0xc01aae87 in sched_sync () at /usr/src/sys/kern/vfs_subr.c:1177 (kgdb) up 3 #3 0xc017739b in lockmgr (lkp=0xcbccdeb8, flags=33620002, interlkp=0xc034e094, p=0xd2de45e0) at /usr/src/sys/kern/kern_lock.c:337 337 panic("lockmgr: locking against myself"); (kgdb) up 1 #4 0xc01a47e8 in getblk (vp=0xd391aa80, blkno=8519728, size=6144, slpflag=0, slptimeo=0) at /usr/src/sys/sys/buf.h:305 305 ret = lockmgr(&(bp)->b_lock, (locktype), &buftimelock, curproc); (kgdb) up 8 #12 0xc02269bf in ffs_blkfree (ip=0xd392ae0c, bno=8103, size=1024) at /usr/src/sys/ufs/ffs/ffs_alloc.c:1470 1470 panic("ffs_blkfree: freeing free frag"); (kgdb) up 1 #13 0xc022af1e in handle_workitem_freeblocks (freeblks=0xc202df00) at /usr/src/sys/ufs/ffs/ffs_softdep.c:2146 2146 ffs_blkfree(&tip, bn, bsize); Copyright (c) 1992-2002 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.7-PRERELEASE #0: Mon Sep 16 10:20:40 EST 2002 root@backup.lane.network:/usr/obj/usr/src/sys/NUCL03 Timecounter "i8254" frequency 1193182 Hz Timecounter "TSC" frequency 730950415 Hz CPU: Pentium III/Pentium III Xeon/Celeron (730.95-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x686 Stepping = 6 Features=0x383fbff real memory = 536739840 (524160K bytes) avail memory = 518791168 (506632K bytes) Preloaded elf kernel "kernel" at 0xc03bc000. netsmb_dev: loaded Pentium Pro MTRR support enabled Using $PIR table, 10 entries at 0xc00f3ad0 npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at 0.0 irq 11 pcib2: at device 30.0 on pci0 pci2: on pcib2 ahc_pci0: port 0xd800-0xd8ff mem 0xfeaff000-0x feafffff irq 11 at device 7.0 on pci2 aic7880: Ultra Wide Channel A, SCSI Id=7, 16/253 SCBs vr0: port 0xdc00-0xdc7f mem 0xfeafec00-0xfeafe c7f irq 5 at device 11.0 on pci2 vr0: Ethernet address: 00:80:c8:da:0b:69 miibus0: on vr0 amphy0: on miibus0 amphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xd480-0xd4ff mem 0xfeafe800-0xfeaf e87f irq 11 at device 15.0 on pci2 xl0: Ethernet address: 00:01:02:80:d0:e5 miibus1: on xl0 xlphy0: <3c905C 10/100 internal PHY> on miibus1 xlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0xffa0-0xffaf at device 31.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 pci0: at 31.2 irq 9 pci0: (vendor=0x8086, dev=0x2413) at 31.3 irq 10 pcm0: port 0xef00-0xef3f,0xe800-0xe8ff irq 10 at device 31 .5 on pci0 orm0: