From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 20 02:05:40 2003 Return-Path: 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 9353937B401 for ; Sun, 20 Jul 2003 02:05:40 -0700 (PDT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id B4C0943F3F for ; Sun, 20 Jul 2003 02:05:38 -0700 (PDT) (envelope-from roam@ringlet.net) Received: (qmail 21366 invoked from network); 20 Jul 2003 08:57:44 -0000 Received: from office.sbnd.net (HELO straylight.ringlet.net) (217.75.140.130) by gandalf.online.bg with SMTP; 20 Jul 2003 08:57:43 -0000 Received: (qmail 37271 invoked by uid 1000); 20 Jul 2003 08:03:51 -0000 Date: Sun, 20 Jul 2003 11:03:50 +0300 From: Peter Pentchev To: LLeweLLyn Reese Message-ID: <20030720080350.GN350@straylight.oblivion.bg> Mail-Followup-To: LLeweLLyn Reese , netch@lucky.net, hackers@freebsd.org References: <20030718091248.GO76126@lucky.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iVCmgExH7+hIHJ1A" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i cc: netch@lucky.net cc: hackers@freebsd.org Subject: Re: complicated downgrade X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 09:05:40 -0000 --iVCmgExH7+hIHJ1A Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 19, 2003 at 08:48:40AM -0700, LLeweLLyn Reese wrote: > Valentin Nechayev writes: > [snip] > > 8. Disable all processes except sshd and run the following (saying gene= rally): > >=20 > > for D in /bin /sbin /etc /boot /usr/bin /usr/sbin /usr/lib /usr/libe= xec \ > > /usr/libdata /usr/share /usr/local /var/db > > do > > mv ${D} ${D}5 > > mv ${D}4 {D} > > done > [snip] >=20 > Once you mv /usr/lib /usr/lib5, dynamicly linked executables will be > broken, until you mv /usr/lib4 /usr/lib (I think). I think it > would be a good idea check every tool you think you might need, > and build a staticly linked executable if the existing executable > isn't. Most of what you need will be staticly linked by default, > but e.g. sshd, ftp, find, vim, are not. (If all goes as planned, > you won't need any of those while /usr/lib is being moved, but > ... ) (Caveat: this isn't based on experience with freebsd, it's > based experience with linux boxen, where *everything* is typically > staticly linked, unless someone rebuilt tools.) This thought occurred to me too; actually, you could get around this problem by rebuilding the whole FreeBSD base system with purely static binaries. This could be done by putting NOSHARED=3Dyes in /etc/make.conf, then going through the buildworld/buildkernel/installkernel/installworld dance. You might have to do this for your 5.x world, reboot with the statically-linked binaries (just in case), build the 4.x world with NOSHARED=3Dyes before the downgrade, do the downgrade (without having to worry about any dynamic libs), then, when the 4.x system is working (hopefully), rebuild the 4.x world without the NOSHARED=3Dyes setting. Note that a NOSHARED world tends to take up quite a bit more space :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@sbnd.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've heard that this sentence is a rumor. --iVCmgExH7+hIHJ1A Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/Gkzm7Ri2jRYZRVMRAhnbAJ9iHLgaY35Si9gDyfp1zDKDfBgyeQCeOXXL KOBF6V1nTA/LxBAQw7ddLLs= =vO+J -----END PGP SIGNATURE----- --iVCmgExH7+hIHJ1A-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 20 06:44:33 2003 Return-Path: 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 01D1837B401 for ; Sun, 20 Jul 2003 06:44:33 -0700 (PDT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66F1843FB1 for ; Sun, 20 Jul 2003 06:44:32 -0700 (PDT) (envelope-from rootman22@comcast.net) Received: from 12-209-185-111.client.attbi.com ([12.209.185.111]) by comcast.net (sccrmhc13) with SMTP id <20030720134431016004n8lne>; Sun, 20 Jul 2003 13:44:31 +0000 From: Joe Warner To: freebsd-hackers@freebsd.org Date: Sun, 20 Jul 2003 07:44:34 -0600 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200307200744.34734.rootman22@comcast.net> Subject: Nvidia Licensing Question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 13:44:33 -0000 Hi, I was talking to someone recently about why there isn't support for Nvidia's Nforce drivers under FreeBSD yet. He said: "This might have something to do with the fact that the NIC driver is not GPL licensed. See the "License" section of the nForce Linux readme: http://download.nvidia.com/XFree86_40/nforce/1.0-0248/readme_nforce-1.0-0248.txt As I remember, FreeBSD only includes software that come under the GPL or BSD license" I responded saying I didn't think it had anything to do with licensing or the Nvidia graphics driver wouldn't be supported either. He responded: "Umm, read the link I provided carefully. The graphics driver is GPL. FreeBSD will include GPLed software without issue. It is only the NIC driver that is NOT GPL. Thus, FreeBSD will not include the NIC driver that NVidia provides, but will include the graphics driver." He says the NIC driver is not covered under the GPL. It that's true then how can they make it available for Linux? ..and: "I suspect that the reason in this case is pure licensing. Read the license section of the readme above. It could likely be an issue with other hardware as well. FreeBSD constrains itself somewhat by taking the GPL/BSD license only philosophical stand. Not all manufacturers are willing to work within that model which means sometimes FreeBSD has to forego the manufacturer's driver and wait for someone to develop a GPL/BSD driver." ..and finally: "The sound driver should be GPL according to the above license, but perhaps since it is bundled with the NIC driver which is non-GPL there is an issue with porting it to BSD. I think nVidia insists anything that it bundles together stays bundled together which would in FreeBSD's mind make the sound driver non-GPLed because it's bundled with the non-GPL NIC driver. Again, the whole GPL/BSD license vs non GPL/BSD license issue. Since the graphics driver is provided as a seperate, GPLed package, it is fine for FreeBSD, but the rest may have issues because of the bundling." Is this correct? Thanks Joe From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 20 06:48:27 2003 Return-Path: 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 3718B37B401 for ; Sun, 20 Jul 2003 06:48:27 -0700 (PDT) Received: from mail.romero3000.com (ip-216-46-71-240.dsl.nyc.megapath.net [216.46.71.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7688443FA3 for ; Sun, 20 Jul 2003 06:48:26 -0700 (PDT) (envelope-from romero3000@romero3000.com) Received: from mail.romero3000.com (localhost.megapath.net [127.0.0.1]) by mail.romero3000.com (Postfix) with SMTP id DECCC4C3DF for ; Sun, 20 Jul 2003 09:48:17 -0400 (EDT) Received: from 216.46.71.240 (SquirrelMail authenticated user romero3000) by mail.romero3000.com with HTTP; Sun, 20 Jul 2003 09:48:17 -0400 (EDT) Message-ID: <58845.216.46.71.240.1058708897.squirrel@mail.romero3000.com> Date: Sun, 20 Jul 2003 09:48:17 -0400 (EDT) From: romero3000@romero3000.com To: freebsd-hackers@freebsd.org User-Agent: SquirrelMail/1.4.0 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 Importance: Normal Subject: quick question about raid controllers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 13:48:27 -0000 sorry i am cross posting this question, but i haven't really gotten any response from Freebsd-questions. Here it is: Are there any SCSI raid controllers that have real-time array rebuild capabilities/tools for FreeBSD?? All of the ones I have used so far require reboot for rebuilding/modifying. Also are there any good tools for monitoring RAID Arrays??? From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 20 08:57:45 2003 Return-Path: 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 A1B4537B401 for ; Sun, 20 Jul 2003 08:57:45 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id A97C643F3F for ; Sun, 20 Jul 2003 08:57:42 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9/8.12.3) with ESMTP id h6KFvfFL032698; Sun, 20 Jul 2003 09:57:41 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 20 Jul 2003 09:57:38 -0600 (MDT) Message-Id: <20030720.095738.130532256.imp@bsdimp.com> To: romero3000@romero3000.com From: "M. Warner Losh" In-Reply-To: <58845.216.46.71.240.1058708897.squirrel@mail.romero3000.com> References: <58845.216.46.71.240.1058708897.squirrel@mail.romero3000.com> X-Mailer: Mew version 2.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: quick question about raid controllers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 15:57:45 -0000 In message: <58845.216.46.71.240.1058708897.squirrel@mail.romero3000.com> romero3000@romero3000.com writes: : Are there any SCSI raid controllers that have real-time array rebuild : capabilities/tools for FreeBSD?? All of the ones I have used so far : require reboot for rebuilding/modifying. Also are there any good tools for : monitoring RAID Arrays??? I'm using aac: aac0: port 0x1000-0x10ff mem 0xec000000-0xec001fff irq 2 at device 9.0 on pci0 aac0: StrongARM SA110 233MHz, 64MB cache memory, required battery present aac0: Kernel 3.0-0, Build 5217, S/N 8a1f1d aac0: Supported Options=53f and it does this. Warner From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 20 10:33:35 2003 Return-Path: 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 B516B37B401; Sun, 20 Jul 2003 10:33:35 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF3FD43F93; Sun, 20 Jul 2003 10:33:34 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9/8.12.9) with ESMTP id h6KHX0ai091930; Sun, 20 Jul 2003 13:33:00 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h6KHX0OB091927; Sun, 20 Jul 2003 13:33:00 -0400 (EDT) Date: Sun, 20 Jul 2003 13:32:59 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Pawel Jakub Dawidek In-Reply-To: <20030719074707.GB437@garage.freebsd.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: deischen@freebsd.org cc: Marc Ramirez cc: freebsd-hackers@freebsd.org Subject: Re: Communications kernel -> userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 17:33:36 -0000 On Sat, 19 Jul 2003, Pawel Jakub Dawidek wrote: > Your choices are: > - device, > - sysctl, > - syscall. There are actually a few other more obscure ways to push information from the kernel to userspace, depending on what you want to accomplish. Write directly to a file from the kernel. ktrace, system accounting, and ktr with alq all stream data directly to a file provided by an authorized user process. quotas and UFS1 extended attribute data are also written directly to a file. On other operating systems, audit implementations frequently take the same approach -- when the goal is long term storage of data in a user-accessible form, but you don't want to stream it through a user process live, this is usually the preference. Typically, when taking this approach, a special system call is used to notify the kernel of the target file to write to -- the file is created by the user process with appropriate protections. Often, but not always, the system call is non-blocking and simply returns once the file is hooked up as a target, and continues until another system call cancels delivery, or switches it to a new target. Stream it through a device node. If you need only one or a small number of processes to listen for events from the kernel, a common approach is a pseudo-device that acts like a file. For example, syslogd listens on /dev/klog for log events from the kernel; some audit implementations also take this approach. Our devd, usbd, and others similarly listen for system events that are exposed to user processes as data on a blocking pseudo-device. One nice thing about this approach is that you can combine it with select(), kqueue(), et al, to do centralized event management in the application. BPF also does this. Both Arla and Coda take this approach for LPC'ing to userspace to request events as a result of VFS operations by processes. Expose it using a special socket type. We expose routing data and network stack administrative controls as special reads, writes, and ioctls on various socket types. I'm not a big fan of this approach, as it special cases a lot of bits, and requires you to get caught up in socket semantics. However, one advantage of this approach is it makes the notion of multicast of events to multiple listeners easier to deal with, since each socket endpoint has automatic message buffering. There are some other odd cases in use as well. The NFS locking code opens a specially named fifo (/var/run/lock) and writes messages to it, which are picked up by rpc.lockd. The lock daemon pushes events back into the kernel using a special system call. I don't really like this approach, as it has some odd semantics -- especially since it reopens the fifo for each operation, and there are credential/ file system namespace inconsistencies. Of these approaches, my favorite are writing directly to a file, and using a psuedo-device, depending on the requirements. They have fairly well-defined security semantics (especially if you properly cache the open-time credentials in the file case). I don't really like the Fifo case as it has to re-look-up the fifo each time, and has some odd blocking semantics. Sockets, as I said, involve a lot of special casing, so unless you're already dealing with network code, you probably don't want to drag it into the mix. If you're creating big new infrastructure for a feature, I suppose you could also hook it up as a first class object at the file descriptor level, in the style of kqueue. If it's relatively minor event data, you could hook up a new kqueue event type. You could also just use a special-purpose system call or sysctl if you don't mind a lot of context switching and lack of buffering. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 20 11:01:46 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 618) id 5E12F37B401; Sun, 20 Jul 2003 11:01:46 -0700 (PDT) In-Reply-To: <200307200744.34734.rootman22@comcast.net> from Joe Warner at "Jul 20, 2003 07:44:34 am" To: rootman22@comcast.net (Joe Warner) Date: Sun, 20 Jul 2003 11:01:46 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20030720180146.5E12F37B401@hub.freebsd.org> From: wpaul@FreeBSD.ORG (Bill Paul) cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Nvidia Licensing Question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 18:01:46 -0000 > Hi, > > I was talking to someone recently about why there isn't > support for Nvidia's Nforce drivers under FreeBSD yet. > > He said: > > "This might have something to do with the fact that the NIC driver is not > GPL licensed. See the "License" section of the nForce Linux readme: [...] It has nothing to do with licensing. The NIC driver is _NOT_ provided in source code form. Yes, they may have stuck it in a section that says 'driver source code,' but if you actually download it and look at it, you'll find that all of the brains of the driver is inside an object module for which there is no source code. If the driver source code was available, then one of two things would occur: - We would discover that the chip is in fact not nVidia's own design, but a some other vendor's design which they have licensed (this is what they did previously, when they licensed a NIC from 3Com). If this turned out to be the case, and the NIC is already supported by another FreeBSD driver, we could tweak it to handle nVidia's chip. - We would be able to strip out all of the register and DMA structure info from the Linux driver and write a FreeBSD driver (assuming the engineer who wrote the driver didn't try to obfuscate the code or was lazy about transcribing register info from the programming manual). I would prefer being able to just get the programming manual from nVidia and write a driver from scratch, but I don't have any nVidia contacts or any info about why nVidia is being such a pain in the ass about releasing info concerning this NIC. -Bill -- ============================================================================= -Bill Paul (510) 749-2329 | Senior Engineer, Master of Unix-Fu wpaul@windriver.com | Wind River Systems ============================================================================= "If stupidity were a handicap, you'd have the best parking spot." ============================================================================= From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 20 11:23:39 2003 Return-Path: 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 F103737B401 for ; Sun, 20 Jul 2003 11:23:38 -0700 (PDT) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 3A8F743F85 for ; Sun, 20 Jul 2003 11:23:38 -0700 (PDT) (envelope-from silby@silby.com) Received: (qmail 11527 invoked from network); 20 Jul 2003 18:23:36 -0000 Received: from niwun.pair.com (HELO localhost) (209.68.2.70) by relay.pair.com with SMTP; 20 Jul 2003 18:23:36 -0000 X-pair-Authenticated: 209.68.2.70 Date: Sun, 20 Jul 2003 13:23:12 -0500 (CDT) From: Mike Silbersack To: Joe Warner In-Reply-To: <200307200744.34734.rootman22@comcast.net> Message-ID: <20030720132052.Q522@odysseus.silby.com> References: <200307200744.34734.rootman22@comcast.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: Nvidia Licensing Question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 18:23:39 -0000 This is becoming a really annoying FAQ. The reason nobody has ported the NIC driver is because the source code is not provided; it's just a binary driver with a wrapper. You'd be just as well off trying to port the Windows driver... I didn't look into the sound driver at all, it may be the same way. Mike "Silby" Silbersack On Sun, 20 Jul 2003, Joe Warner wrote: > Hi, > > I was talking to someone recently about why there isn't > support for Nvidia's Nforce drivers under FreeBSD yet. From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 20 12:15:10 2003 Return-Path: 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 F184737B405; Sun, 20 Jul 2003 12:15:09 -0700 (PDT) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C5CC43F3F; Sun, 20 Jul 2003 12:15:09 -0700 (PDT) (envelope-from rootman22@comcast.net) Received: from 12-209-185-111.client.attbi.com ([12.209.185.111]) by comcast.net (rwcrmhc13) with SMTP id <2003072019150301500djgd2e>; Sun, 20 Jul 2003 19:15:03 +0000 From: Joe Warner To: wpaul@FreeBSD.ORG (Bill Paul) Date: Sun, 20 Jul 2003 13:15:07 -0600 User-Agent: KMail/1.5.2 References: <20030720180146.5E12F37B401@hub.freebsd.org> In-Reply-To: <20030720180146.5E12F37B401@hub.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200307201315.07253.rootman22@comcast.net> cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Nvidia Licensing Question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 19:15:10 -0000 Thanks Bill, I didn't think it had anything to do with licensing but I wanted to hear it from the horses mouth, so to speak. Thanks for the explanantion. -- Joe On Sunday 20 July 2003 12:01 pm, Bill Paul wrote: > > Hi, > > > > I was talking to someone recently about why there isn't > > support for Nvidia's Nforce drivers under FreeBSD yet. > > > > He said: > > > > "This might have something to do with the fact that the NIC driver is not > > GPL licensed. See the "License" section of the nForce Linux readme: > > [...] > > It has nothing to do with licensing. The NIC driver is _NOT_ provided > in source code form. Yes, they may have stuck it in a section that > says 'driver source code,' but if you actually download it and look > at it, you'll find that all of the brains of the driver is inside an > object module for which there is no source code. > > If the driver source code was available, then one of two things would > occur: > > - We would discover that the chip is in fact not nVidia's own design, > but a some other vendor's design which they have licensed (this is > what they did previously, when they licensed a NIC from 3Com). If > this turned out to be the case, and the NIC is already supported > by another FreeBSD driver, we could tweak it to handle nVidia's > chip. > > - We would be able to strip out all of the register and DMA structure > info from the Linux driver and write a FreeBSD driver (assuming the > engineer who wrote the driver didn't try to obfuscate the code or > was lazy about transcribing register info from the programming > manual). > > I would prefer being able to just get the programming manual from > nVidia and write a driver from scratch, but I don't have any nVidia > contacts or any info about why nVidia is being such a pain in the > ass about releasing info concerning this NIC. > > -Bill > > -- > =========================================================================== >== -Bill Paul (510) 749-2329 | Senior Engineer, Master of Unix-Fu > wpaul@windriver.com | Wind River Systems > =========================================================================== >== "If stupidity were a handicap, you'd have the best parking spot." > =========================================================================== >== From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 20 12:19:57 2003 Return-Path: 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 A4AD737B401 for ; Sun, 20 Jul 2003 12:19:57 -0700 (PDT) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E69F43F85 for ; Sun, 20 Jul 2003 12:19:57 -0700 (PDT) (envelope-from rootman22@comcast.net) Received: from 12-209-185-111.client.attbi.com ([12.209.185.111]) by comcast.net (sccrmhc11) with SMTP id <2003072019195501100kl3mse>; Sun, 20 Jul 2003 19:19:55 +0000 From: Joe Warner To: Mike Silbersack Date: Sun, 20 Jul 2003 13:19:54 -0600 User-Agent: KMail/1.5.2 References: <200307200744.34734.rootman22@comcast.net> <20030720132052.Q522@odysseus.silby.com> In-Reply-To: <20030720132052.Q522@odysseus.silby.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200307201319.54314.rootman22@comcast.net> cc: freebsd-hackers@freebsd.org Subject: Re: Nvidia Licensing Question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 19:19:57 -0000 On Sunday 20 July 2003 12:23 pm, Mike Silbersack wrote: > This is becoming a really annoying FAQ. I apologize, I searched the lists to see if this topic had already been covered but didn't come up with anything. Maybe I was using the wrong search terms? > > The reason nobody has ported the NIC driver is because the source code is > not provided; it's just a binary driver with a wrapper. You'd be just as > well off trying to port the Windows driver... > > I didn't look into the sound driver at all, it may be the same way. Thanks for the explanation and sorry to be a bother, I just prefer the truth to heresay. -- Joe > > Mike "Silby" Silbersack > > On Sun, 20 Jul 2003, Joe Warner wrote: > > Hi, > > > > I was talking to someone recently about why there isn't > > support for Nvidia's Nforce drivers under FreeBSD yet. From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 20 14:10:47 2003 Return-Path: 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 B96D537B401 for ; Sun, 20 Jul 2003 14:10:47 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.SNVACAID.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09CC743F75 for ; Sun, 20 Jul 2003 14:10:47 -0700 (PDT) (envelope-from kientzle@acm.org) Received: from acm.org ([66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id h6KLAksE017548 for ; Sun, 20 Jul 2003 14:10:46 -0700 (PDT) (envelope-from kientzle@acm.org) Message-ID: <3F1B0610.90803@acm.org> Date: Sun, 20 Jul 2003 14:13:52 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.1) Gecko/20021005 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Correct way to call execve? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kientzle@acm.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 21:10:48 -0000 I can find no way to call execve that actually compiles without warnings. If I use: char *argv[2]; argv[0] = _PATH_BSHELL; argv[1] = NULL; execve(_PATH_BSHELL,argv,environ); then the first assignment is "discarding qualifiers". If I declare argv as "const char *", then the call to execve() warns about "incompatible pointer type" for the second argument. Reading through SUSv3 I find that the committee thought that the second argument to execve() should have been "const char * const *", but they didn't want old code to generate compiler warnings. (Of course, compilers that correctly type constant strings as "const char *" break that.) Does anyone know a good way out of this mess? (Suggestions to turn off compiler warnings will be ignored. ;-) Tim Kientzle From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 20 15:50:43 2003 Return-Path: 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 86FD837B401 for ; Sun, 20 Jul 2003 15:50:43 -0700 (PDT) Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id C50B043F93 for ; Sun, 20 Jul 2003 15:50:42 -0700 (PDT) (envelope-from bicknell@ussenterprise.ufp.org) Received: from ussenterprise.ufp.org (bicknell@localhost [127.0.0.1]) by ussenterprise.ufp.org (8.12.9/8.12.9) with ESMTP id h6KMog8i026583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 20 Jul 2003 18:50:42 -0400 (EDT) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.12.9/8.12.9/Submit) id h6KMofuW026582 for hackers@freebsd.org; Sun, 20 Jul 2003 18:50:41 -0400 (EDT) Date: Sun, 20 Jul 2003 18:50:41 -0400 From: Leo Bicknell To: hackers@freebsd.org Message-ID: <20030720225041.GA26277@ussenterprise.ufp.org> Mail-Followup-To: hackers@freebsd.org References: <3F1B0610.90803@acm.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline In-Reply-To: <3F1B0610.90803@acm.org> Organization: United Federation of Planets X-PGP-Key: http://www.ufp.org/~bicknell/ Subject: Re: Correct way to call execve? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 22:50:43 -0000 --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In a message written on Sun, Jul 20, 2003 at 02:13:52PM -0700, Tim Kientzle= wrote: > If I declare argv as "const char *", > then the call to execve() warns about > "incompatible pointer type" for the > second argument. Almost, but the other order is important here, this passes gcc -Wall: #include #include int main(int argc, char *const argv[], char *const envp[]) { char *const execargv[] =3D { _PATH_BSHELL, NULL }; execve(_PATH_BSHELL,execargv,envp); return 0; } --=20 Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org --OXfL5xGRrasGEqWY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/GxzBNh6mMG5yMTYRAkQCAJoDyjQr2QDxYPCdWNSORhHRBatDIgCfT5v5 FdkH53v4u5HDkGvOVBVU6Ss= =UjGZ -----END PGP SIGNATURE----- --OXfL5xGRrasGEqWY-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 20 16:57:47 2003 Return-Path: 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 A8ED137B401 for ; Sun, 20 Jul 2003 16:57:47 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF2AD43F3F for ; Sun, 20 Jul 2003 16:57:46 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 284DE3ABB4C; Mon, 21 Jul 2003 01:57:59 +0200 (CEST) Date: Mon, 21 Jul 2003 01:57:59 +0200 From: Pawel Jakub Dawidek To: freebsd-hackers@freebsd.org Message-ID: <20030720235759.GJ437@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="UUBKWyapWpFAak7q" Content-Disposition: inline X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.8-RELEASE i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i cc: dillon@apollo.backplane.com Subject: VM problem... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2003 23:57:47 -0000 --UUBKWyapWpFAak7q Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello hackers... I'll try to describe my problem carefully, maybe there will be someone who will be able to help me with this. Problem: Strage 'Bus errors'. What I'm doing? I allocate memory in process' vmspace with my version of obreak function. It is quite simlar to those from /sys/vm/vm_unix.c. end =3D vm->vm_daddr + ctob(vm->vm_dsize); my_obreak(vm, end + size); Now I'm marking newly allocated range as read-only (it is my version of vm_map_protect() function, but is really simlar to): my_vm_protect(&vm->vm_map, end, end + size, VM_PROT_READ); Now execve() for this process is called, so I can't remove this memory, because this range isn't in process' vmspace anymore (I believe, that it should be removed, by VM or execve()). Process forks and now something happends in child and parent quits with SIGBUS. I've add some debug to trapsignal() from /sys/kern/kern_sig.c. Now I'm able to list every entry from process' vm_map with this function: void show_entries(struct proc *p) { vm_map_entry_t entry; entry =3D p->p_vmspace->vm_map.hint; do { if ((entry->max_protection & VM_PROT_WRITE) =3D=3D 0) { printf("ENTRY:%u: %p-%p (%d:%d)\n", p->p_pid, (void *)entry->start, (void *)entry->end, entry->protection, entry->max_protection); } entry =3D entry->next; } while (entry !=3D p->p_vmspace->vm_map.hint); } So as you can see I'm listing every entry that isn't writable. This function is called when process is killed by kernel with SIGBUS. It shows me that only this region isn't writable: ENTRY:: 0-0xbfc00000 (0:0) Ok! But all my allocations starts with 0x8xxxxxxx. But core file that I get tells me, that: Cannot access memory at address 0xbfbffc20. If I change VM_PROT_READ to VM_PROT_ALL when calling my_vm_protect() everything is correct. There is no SIGBUS, but this region: 0-0xbfc00000 is still marked as not writable (and I really believe that it should be:)). So how my allocations and read-only stuff interact with those bus errors? PS. I'm CC-ing this to Matt Dillon also. I know he is quite busy now, but maybe he will be able to track this down. PS2. I'm talking about FreeBSD 4.x here. --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --UUBKWyapWpFAak7q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPxsshz/PhmMH/Mf1AQF9DAP/W89l82OIshQtIzjd1TPDXN7jTwlEZ3Yz 2Xi0hXkhtwWeJp/hng7thRN9QJpvH23naHRfTHj0kDymnRSWW09AUAnvyr0VqwIJ YDExkZiOQXr8Oa+jfY+s2T6g4tYlXMxUhgOUR5XAmyYvS+kgUQaPnMdruxAZ/lrx ounDrZHQjSo= =4GD6 -----END PGP SIGNATURE----- --UUBKWyapWpFAak7q-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 20 22:54:05 2003 Return-Path: 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 4B33637B401 for ; Sun, 20 Jul 2003 22:54:05 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA71243F75 for ; Sun, 20 Jul 2003 22:54:04 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 6EEB72A7EA; Sun, 20 Jul 2003 22:54:04 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Matthew Dillon In-Reply-To: <200307180511.h6I5B5HV004858@apollo.backplane.com> Date: Sun, 20 Jul 2003 22:54:04 -0700 From: Peter Wemm Message-Id: <20030721055404.6EEB72A7EA@canning.wemm.org> cc: hackers@freebsd.org Subject: Re: Possible issue with in-kernel ELF loader. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 05:54:05 -0000 Matthew Dillon wrote: > I got an odd bug report for DragonFly today. Apparently the module loader > was broken, the kernel complained about not being able to find > 'globaldata'. > > It turns out that the kernel's internal ELF loader is misinterpreting > an ABS symbol (i.e. set with .SET in assembly) whos value is 0 as being > 'not found', and once that is fixed it was also confusing the absolute > symbol with a COMMON symbol. Thanks for the pointer. FWIW, We use -fno-common on 5.x to avoid common symbols even existing in the first place. There were a few missing externs that this turned up. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 00:18:54 2003 Return-Path: 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 23C4E37B401 for ; Mon, 21 Jul 2003 00:18:54 -0700 (PDT) Received: from mwinf0402.wanadoo.fr (smtp5.wanadoo.fr [193.252.22.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09E2743F3F for ; Mon, 21 Jul 2003 00:18:53 -0700 (PDT) (envelope-from molter@tin.it) Received: from www.example.org (ANice-205-1-2-50.w81-53.abo.wanadoo.fr [81.53.50.50]) by mwinf0402.wanadoo.fr (SMTP Server) with SMTP id A9C98800120 for ; Mon, 21 Jul 2003 09:18:51 +0200 (CEST) Received: (qmail 59110 invoked by uid 1000); 21 Jul 2003 07:18:42 -0000 Date: Mon, 21 Jul 2003 09:18:42 +0200 From: Marco Molteni To: freebsd-hackers@freebsd.org Message-ID: <20030721071842.GC58121@cobweb.example.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: differences in USB support between FreeBSD 4.x and 5.x ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 07:18:54 -0000 [I sent the same message to usb-bsd@eleetbsd.org, but since that list seems not very active, I am asking here too] Hi all, the subject says it all. I am considering using FreeBSD for a robotics project, and I am thinking of using 4.x for stability. But, since we will probably use USB a lot, I am wondering if maybe 5.x is a better choice. Any ideas, besides the "compare the USB source between 4.x and 5.x" suggestion? ;-) thanks marco From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 01:42:45 2003 Return-Path: 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 14B9137B401 for ; Mon, 21 Jul 2003 01:42:45 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D96C43FA3 for ; Mon, 21 Jul 2003 01:42:44 -0700 (PDT) (envelope-from ilmar@watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9/8.12.9) with ESMTP id h6L8gDai096447 for ; Mon, 21 Jul 2003 04:42:13 -0400 (EDT) (envelope-from ilmar@watson.org) Received: from localhost (ilmar@localhost)h6L8gD8x096444 for ; Mon, 21 Jul 2003 04:42:13 -0400 (EDT) X-Authentication-Warning: fledge.watson.org: ilmar owned process doing -bs Date: Mon, 21 Jul 2003 04:42:12 -0400 (EDT) From: "Ilmar S. Habibulin" To: freebsd-hackers@freebsd.org In-Reply-To: <20030721071842.GC58121@cobweb.example.org> Message-ID: <20030721043657.X96418@fledge.watson.org> References: <20030721071842.GC58121@cobweb.example.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: How to use functions from libs in /usr/local/lib in pam? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 08:42:45 -0000 I'm trying to write pam module, which uses libs from /usr/local/lib (lber and lsap). What should i put in Makefile in order to link module with this libs? LIBLDAP= /usr/local/lib/ldap.a LDADD+= -L/usr/local/lib -lldap LDFLAGS += -L/usr/local/lib -lldap DPADD= ${LIBCRYPT} ${LIBLDAP} doesn't help. Thanks in advance. From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 03:54:00 2003 Return-Path: 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 D6A8E37B401 for ; Mon, 21 Jul 2003 03:54:00 -0700 (PDT) Received: from dgap-gw.mipt.ru (dgap-gw.mipt.ru [194.85.81.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E55543F75 for ; Mon, 21 Jul 2003 03:53:59 -0700 (PDT) (envelope-from andrew@nas.dgap.mipt.ru) Received: (qmail 25866 invoked from network); 21 Jul 2003 10:53:57 -0000 Received: from unknown (HELO nas.dgap.mipt.ru) ([194.85.81.203]) (envelope-sender ) by dgap-gw.mipt.ru (qmail-ldap-1.03) with SMTP for ; 21 Jul 2003 10:53:57 -0000 Received: from nas.dgap.mipt.ru (localhost [127.0.0.1]) by nas.dgap.mipt.ru (8.12.8p1/8.12.8) with ESMTP id h6LArvvt002236; Mon, 21 Jul 2003 14:53:57 +0400 (MSD) (envelope-from andrew@nas.dgap.mipt.ru) Received: (from andrew@localhost) by nas.dgap.mipt.ru (8.12.8p1/8.12.8/Submit) id h6LArtKx002235; Mon, 21 Jul 2003 14:53:55 +0400 (MSD) Date: Mon, 21 Jul 2003 14:53:55 +0400 From: "Andrew L. Neporada" To: Avleen Vig Message-ID: <20030721105355.GA2198@nas.dgap.mipt.ru> References: <20030716125744.GI68950@silverwraith.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030716125744.GI68950@silverwraith.com> User-Agent: Mutt/1.4i cc: freebsd-hackers@freebsd.org Subject: Re: 4.8 panic "ffs_clusteralloc: map mismatch" [SOLVED] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 10:54:01 -0000 On Wed, Jul 16, 2003 at 05:57:44AM -0700, Avleen Vig wrote: > > I have been experiencing several "ffs_clusteralloc: map mismatch" > > kernel panics (always while heavy r/w activity on ad0). PC in question > > has SuperMicro P3TDL3 motherboard, > > 2 ide + 1 scsi HDD and 4 nics (full dmesg & kernel config attached). > > Andrew, > > I spend about two to three years fighting with a system trying to figure > out what was wrong, and why these errors were caused. I got the very > same crashes you're seeing now. > I'm sure others are too, and I think this reply would be useful for the > archives. It seems that this panic was a result of filesystem corruption, which was caused by hw.ata.wc=1 on and HDD. After setting up hw.ata.wc=0 in /boot/loader.conf problems are all gone. > -- > Avleen Vig "Say no to cheese-eating surrender-monkeys" > Systems Admin "Fast, Good, Cheap. Pick any two." > www.silverwraith.com "Move BSD. For great justice!" Andrew. From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 05:55:45 2003 Return-Path: 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 48B5D37B42B for ; Mon, 21 Jul 2003 05:55:45 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52A3B43FDD for ; Mon, 21 Jul 2003 05:55:39 -0700 (PDT) (envelope-from ru@sunbay.com) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h6LCtV0U097725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 21 Jul 2003 15:55:31 +0300 (EEST) (envelope-from ru@sunbay.com) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.9/8.12.8/Submit) id h6LCtReY097712; Mon, 21 Jul 2003 15:55:27 +0300 (EEST) (envelope-from ru) Date: Mon, 21 Jul 2003 15:55:27 +0300 From: Ruslan Ermilov To: "Ilmar S. Habibulin" Message-ID: <20030721125527.GC95314@sunbay.com> References: <20030721071842.GC58121@cobweb.example.org> <20030721043657.X96418@fledge.watson.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HG+GLK89HZ1zG0kk" Content-Disposition: inline In-Reply-To: <20030721043657.X96418@fledge.watson.org> User-Agent: Mutt/1.5.4i cc: freebsd-hackers@freebsd.org Subject: Re: How to use functions from libs in /usr/local/lib in pam? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 12:55:45 -0000 --HG+GLK89HZ1zG0kk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 21, 2003 at 04:42:12AM -0400, Ilmar S. Habibulin wrote: >=20 > I'm trying to write pam module, which uses libs from /usr/local/lib (lber > and lsap). What should i put in Makefile in order to link module with this > libs? >=20 > LIBLDAP=3D /usr/local/lib/ldap.a >=20 > LDADD+=3D -L/usr/local/lib -lldap > LDFLAGS +=3D -L/usr/local/lib -lldap > DPADD=3D ${LIBCRYPT} ${LIBLDAP} >=20 > doesn't help. >=20 The library should be named /usr/local/lib/libldap.a at the minimum, to make -lldap work. Also, -L should be taken out of LDADD, and be put only in LDFLAGS, so it should look like this: LIBLDAP=3D /usr/local/lib/libldap.a DPADD=3D ${LIBCRYPT} ${LIBLDAP} LDADD=3D -lcrypt -lldap LDFLAGS=3D -L/usr/local/lib Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software Ltd, ru@FreeBSD.org FreeBSD committer --HG+GLK89HZ1zG0kk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD4DBQE/G+K/Ukv4P6juNwoRAgsxAJ0TuWS6OzebTKnoiOCNNzNqYZDsaACY4fpa lYdVZEMT2cAlF3YtB86TRw== =oSXy -----END PGP SIGNATURE----- --HG+GLK89HZ1zG0kk-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 06:01:03 2003 Return-Path: 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 DE6F937B401 for ; Mon, 21 Jul 2003 06:01:03 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79AB143F85 for ; Mon, 21 Jul 2003 06:01:02 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.9/8.12.9) with ESMTP id h6LD0YhR016053 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Mon, 21 Jul 2003 15:00:47 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.9/8.12.9) with ESMTP id h6LD0XAx059846 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 21 Jul 2003 15:00:34 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.9/8.12.9) with ESMTP id h6LD0Xgt042533; Mon, 21 Jul 2003 15:00:33 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.9/8.12.9/Submit) id h6LD0EjC042532; Mon, 21 Jul 2003 15:00:14 +0200 (CEST) Date: Mon, 21 Jul 2003 15:00:14 +0200 From: Bernd Walter To: Marco Molteni Message-ID: <20030721130013.GI19386@cicely12.cicely.de> References: <20030721071842.GC58121@cobweb.example.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030721071842.GC58121@cobweb.example.org> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: freebsd-hackers@freebsd.org Subject: Re: differences in USB support between FreeBSD 4.x and 5.x ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 13:01:04 -0000 On Mon, Jul 21, 2003 at 09:18:42AM +0200, Marco Molteni wrote: > [I sent the same message to usb-bsd@eleetbsd.org, but since that list > seems not very active, I am asking here too] > > Hi all, > > the subject says it all. > > I am considering using FreeBSD for a robotics project, and I am > thinking of using 4.x for stability. But, since we will probably use > USB a lot, I am wondering if maybe 5.x is a better choice. I believe 4.x has all you need for your project. If you really find a problem then the missing part can be MFC'ed. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 06:19:25 2003 Return-Path: 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 35B1A37B401 for ; Mon, 21 Jul 2003 06:19:25 -0700 (PDT) Received: from www.bluecirclesoft.com (cvg-65-26-145-190.cinci.rr.com [65.26.145.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5198E43F75 for ; Mon, 21 Jul 2003 06:19:24 -0700 (PDT) (envelope-from marc.ramirez@bluecirclesoft.com) Received: from www.bluecirclesoft.com (localhost [127.0.0.1]) h6LDJHSW047220; Mon, 21 Jul 2003 09:19:17 -0400 (EDT) (envelope-from mrami@bluecirclesoft.com) Received: from localhost (mrami@localhost)h6LDJGun047217; Mon, 21 Jul 2003 09:19:17 -0400 (EDT) X-Authentication-Warning: www.bluecirclesoft.com: mrami owned process doing -bs Date: Mon, 21 Jul 2003 09:19:15 -0400 (EDT) From: Marc Ramirez To: "M. Warner Losh" In-Reply-To: <20030719.111654.28438110.imp@bsdimp.com> Message-ID: <20030721091758.A47203@www.bluecirclesoft.com> References: <20030718150047.O61759@www.bluecirclesoft.com> <20030719.111654.28438110.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: marc.ramirez@bluecirclesoft.com cc: freebsd-hackers@freebsd.org Subject: Re: Communications kernel -> userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 13:19:25 -0000 On Sat, 19 Jul 2003, M. Warner Losh wrote: > In message: <20030718150047.O61759@www.bluecirclesoft.com> > Marc Ramirez writes: > : I have a device driver that needs to make requests for data from a > : userland daemon. What's the preferred method for doing this in 4.8R and > : 5.1R? I'm assuming the answer is Unix-domain sockets... > > what's wrong with a simple read channel? Nothing except that this is my first real foray into non-trivial kernel programming. :) Marc. > why complicate things by > bringing sockets into it? > > Warner > > -- Marc Ramirez Blue Circle Software Corporation 513-688-1070 (main) 513-382-1270 (direct) www.bluecirclesoft.com From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 06:21:57 2003 Return-Path: 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 36EAC37B401 for ; Mon, 21 Jul 2003 06:21:57 -0700 (PDT) Received: from www.bluecirclesoft.com (cvg-65-26-145-190.cinci.rr.com [65.26.145.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F81343F75 for ; Mon, 21 Jul 2003 06:21:56 -0700 (PDT) (envelope-from marc.ramirez@bluecirclesoft.com) Received: from www.bluecirclesoft.com (localhost [127.0.0.1]) h6LDLtSW047233; Mon, 21 Jul 2003 09:21:55 -0400 (EDT) (envelope-from mrami@bluecirclesoft.com) Received: from localhost (mrami@localhost)h6LDLtk9047230; Mon, 21 Jul 2003 09:21:55 -0400 (EDT) X-Authentication-Warning: www.bluecirclesoft.com: mrami owned process doing -bs Date: Mon, 21 Jul 2003 09:21:55 -0400 (EDT) From: Marc Ramirez To: Terry Lambert In-Reply-To: <3F18D07F.BEE28FF9@mindspring.com> Message-ID: <20030721092121.V47203@www.bluecirclesoft.com> References: <20030718150047.O61759@www.bluecirclesoft.com> <3F18D07F.BEE28FF9@mindspring.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: Communications kernel -> userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 13:21:57 -0000 On Fri, 18 Jul 2003, Terry Lambert wrote: > Marc Ramirez wrote: > > I asked this in -questions, but got no response; sorry for the repost. > > > > I have a device driver that needs to make requests for data from a > > userland daemon. What's the preferred method for doing this in 4.8R and > > 5.1R? I'm assuming the answer is Unix-domain sockets... > > It depends on the application. In most cases these are set up > as request/response protocols. > > In that case, the best method is to ise an ioctl() or fcntl() > (which you use depends on what in the kernel is talking to > userland), and then "returning" to user space with the request. > The userland then makes another call back down with the response, > and the next wait-for-request. This saves you fully 50% of the > protection domain crossing system calls from an ordinary callback, > and it saves you 300% of the protection domain crossings of what > you would need for a pipe/FIFO/unix-domain-socket. I understand. Thanks! > E.g.: > > user kernel > ---- ------ > REQ1 make_req() > sleep_waiting_for_available() > ioctl(fd, MY_GETREQ, &req) > sleep_waiting_for_req() > copyout() > sleep_waiting_for_rsp() > ioctl(fd, MY_RSPREQ, &req) > sleep_waiting_for_req() > copyin() > ... > REQ2 make_req() > copyout() > sleep_waiting_for_rsp() > ioctl(fd, MY_RSPREQ, &req) > sleep_waiting_for_req() > copyin() > ... > ... > > -- Terry > -- Marc Ramirez Blue Circle Software Corporation 513-688-1070 (main) 513-382-1270 (direct) www.bluecirclesoft.com From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 06:49:49 2003 Return-Path: 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 4C4BA37B401 for ; Mon, 21 Jul 2003 06:49:49 -0700 (PDT) Received: from hysteria.spc.org (hysteria.spc.org [195.206.69.234]) by mx1.FreeBSD.org (Postfix) with SMTP id 486CF43F93 for ; Mon, 21 Jul 2003 06:49:48 -0700 (PDT) (envelope-from bms@hysteria.spc.org) Received: (qmail 10931 invoked by uid 5013); 21 Jul 2003 13:47:31 -0000 Date: Mon, 21 Jul 2003 14:47:31 +0100 From: Bruce M Simpson To: hackers@freebsd.org Message-ID: <20030721134731.GF22295@spc.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DSayHWYpDlRfCAAQ" Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: PAE correctness X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 13:49:49 -0000 --DSayHWYpDlRfCAAQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I should be most grateful if someone reviews the attached code fragment and let me know how to do the right thing for PAE whilst remaining machine-independent. My previous version of this code was written after reading the pre-busdma'd bktr(4) driver, which used pmap_kenter() - bad puppy! Should I even be using pmap_map() in this case? This does make the assumption that the cardbus/pccard drivers take care of pushing the memory window into PCI visibility, and that the PCI regions can be mapped into the 'real' memory address space. I should note I also peeked at sparc64_bus_mem_map() this morning for pointers. Love and hugs, BMS --DSayHWYpDlRfCAAQ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="foo.c" ... struct pcmem_softc { ... /* common memory mapping descriptors */ vm_paddr_t sc_cm_base; vm_paddr_t sc_cm_size; vm_offset_t sc_cm_kva_base; vm_size_t sc_cm_kva_size; ... }; ... /* * pcmem_phys_map(): * * Map the common memory window of the PCMCIA memory card in an * architecture-independent and SMP coherent manner. Record the * addresses used within the card's soft-state structure for * later use by pcmem_phys_unmap(). * * The pccard code does not map the window for us, therefore * this code is necessary. * * Returns the first mapped virtual address of the card's common * memory, or 0 to indicate failure. * * XXX needs address arithmetic review for PAE */ static vm_offset_t pcmem_phys_map(struct pcmem_softc *sc) { vm_paddr_t pa, off, psize; vm_offset_t va; vm_size_t vsize; /* clip all address ranges to within page boundaries */ pa = trunc_page(sc->sc_cm_base); psize = round_page(sc->sc_cm_size); vsize = (vm_size_t) psize; off = sc->sc_cm_base - pa; /* reserve a non-pageable memory range within the kva. */ va = kmem_alloc_nofault(kernel_map, vsize); if (va == (vm_offset_t) 0) return (0); va = pmap_map(&va, pa, pa + psize, VM_PROT_READ); if (va == (vm_offset_t) 0) { kmem_free(kernel_map, va, vsize); return (0); } sc->sc_cm_kva_size = vsize; sc->sc_cm_kva_base = va; return (va + off); } /* * pcmem_phys_unmap(): * * Unmap the common memory window of the PCMCIA memory card in an * architecture-independent and SMP coherent manner. */ static void pcmem_phys_unmap(struct pcmem_softc *sc) { pmap_remove(kernel_pmap, sc->sc_cm_kva_base, sc->sc_cm_kva_size); kmem_free(kernel_map, sc->sc_cm_kva_base, sc->sc_cm_kva_size); sc->sc_cm_kva_base = sc->sc_cm_kva_size = 0; } --DSayHWYpDlRfCAAQ-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 07:43:04 2003 Return-Path: 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 58FA737B401; Mon, 21 Jul 2003 07:43:04 -0700 (PDT) Received: from www.bluecirclesoft.com (cvg-65-26-145-190.cinci.rr.com [65.26.145.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60E8943FB1; Mon, 21 Jul 2003 07:43:03 -0700 (PDT) (envelope-from marc.ramirez@bluecirclesoft.com) Received: from www.bluecirclesoft.com (localhost [127.0.0.1]) h6LEh2SW047380; Mon, 21 Jul 2003 10:43:02 -0400 (EDT) (envelope-from mrami@bluecirclesoft.com) Received: from localhost (mrami@localhost)h6LEh1AG047377; Mon, 21 Jul 2003 10:43:02 -0400 (EDT) X-Authentication-Warning: www.bluecirclesoft.com: mrami owned process doing -bs Date: Mon, 21 Jul 2003 10:43:01 -0400 (EDT) From: Marc Ramirez To: Pawel Jakub Dawidek In-Reply-To: <20030719074707.GB437@garage.freebsd.pl> Message-ID: <20030721092218.C47203@www.bluecirclesoft.com> References: <20030719074707.GB437@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: deischen@freebsd.org cc: Marc Ramirez cc: freebsd-hackers@freebsd.org Subject: Re: Communications kernel -> userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 14:43:04 -0000 On Sat, 19 Jul 2003, Pawel Jakub Dawidek wrote: > On Fri, Jul 18, 2003 at 03:47:05PM -0400, Marc Ramirez wrote: > +> I have a remote datastore that I want to present as a filesystem. There > +> are two parts to this: fetching raw data over the network, and doing some > +> processing on the data. For purposes of maintainability, I'd like to do > +> as little of this as possible inside the kernel, so I've currently got a > +> daemon to fetch and process the data, and then pipes it over a socket to > +> the kernel FS layer. > > Your choices are: > - device, > - sysctl, > - syscall. > > You need to think about what you exactly need and which options will be > the best. Creating new syscall isn't good idea, creating device is more > complicated than sysctl, but of course it's up to you and your needs. Okay, thanks. Syscall seems completely counter-intuitive for my needs, anyway. Marc. -- Marc Ramirez Blue Circle Software Corporation 513-688-1070 (main) 513-382-1270 (direct) www.bluecirclesoft.com From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 07:52:06 2003 Return-Path: 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 E618D37B401; Mon, 21 Jul 2003 07:52:05 -0700 (PDT) Received: from www.bluecirclesoft.com (cvg-65-26-145-190.cinci.rr.com [65.26.145.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 065E943F75; Mon, 21 Jul 2003 07:52:05 -0700 (PDT) (envelope-from marc.ramirez@bluecirclesoft.com) Received: from www.bluecirclesoft.com (localhost [127.0.0.1]) h6LEq4SW047398; Mon, 21 Jul 2003 10:52:04 -0400 (EDT) (envelope-from mrami@bluecirclesoft.com) Received: from localhost (mrami@localhost)h6LEq3up047395; Mon, 21 Jul 2003 10:52:04 -0400 (EDT) X-Authentication-Warning: www.bluecirclesoft.com: mrami owned process doing -bs Date: Mon, 21 Jul 2003 10:52:03 -0400 (EDT) From: Marc Ramirez To: Robert Watson In-Reply-To: Message-ID: <20030721104808.E47203@www.bluecirclesoft.com> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: deischen@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Re: Communications kernel -> userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 14:52:06 -0000 Cool. Thanks, everyone! Messrs. Watson and Lambert have convinced me to go the pseudo-device route. I think that's really going to clean up a lot of the code. I'm so excited! Thanks! Marc. On Sun, 20 Jul 2003, Robert Watson wrote: > > On Sat, 19 Jul 2003, Pawel Jakub Dawidek wrote: > > > Your choices are: > > - device, > > - sysctl, > > - syscall. > > There are actually a few other more obscure ways to push information from > the kernel to userspace, depending on what you want to accomplish. > > Write directly to a file from the kernel. ktrace, system accounting, and > ktr with alq all stream data directly to > a file provided by an authorized user process. quotas and UFS1 > extended attribute data are also written directly to a file. On > other operating systems, audit implementations frequently take the same > approach -- when the goal is long term storage of data in a > user-accessible > form, but you don't want to stream it through a user process live, this > is usually the preference. Typically, when taking this approach, a > special system call is used to notify the kernel of the target file to > write to -- the file is created by the user process with appropriate > protections. Often, but not always, the system call is non-blocking and > simply returns once the file is hooked up as a target, and continues > until another system call cancels delivery, or switches it to a new > target. > > Stream it through a device node. If you need only one or a small number > of processes to listen for events from the kernel, a common approach > is a pseudo-device that acts like a file. For example, syslogd listens > on /dev/klog for log events from the kernel; some audit implementations > also take this approach. Our devd, usbd, and others similarly listen > for system events that are exposed to user processes as data on a > blocking pseudo-device. One nice thing about this approach is that you > can combine it with select(), kqueue(), et al, to do centralized event > management in the application. BPF also does this. Both Arla and > Coda take this approach for LPC'ing to userspace to request events > as a result of VFS operations by processes. > > Expose it using a special socket type. We expose routing data and > network stack administrative controls as special reads, writes, and > ioctls on various socket types. I'm not a big fan of this approach, > as it special cases a lot of bits, and requires you to get caught > up in socket semantics. However, one advantage of this approach is > it makes the notion of multicast of events to multiple listeners easier > to deal with, since each socket endpoint has automatic message buffering. > > There are some other odd cases in use as well. The NFS locking code > opens a specially named fifo (/var/run/lock) and writes messages to > it, which are picked up by rpc.lockd. The lock daemon pushes events > back into the kernel using a special system call. I don't really > like this approach, as it has some odd semantics -- especially since > it reopens the fifo for each operation, and there are credential/ > file system namespace inconsistencies. > > Of these approaches, my favorite are writing directly to a file, and using > a psuedo-device, depending on the requirements. They have fairly > well-defined security semantics (especially if you properly cache the > open-time credentials in the file case). I don't really like the Fifo > case as it has to re-look-up the fifo each time, and has some odd blocking > semantics. Sockets, as I said, involve a lot of special casing, so unless > you're already dealing with network code, you probably don't want to drag > it into the mix. If you're creating big new infrastructure for a feature, > I suppose you could also hook it up as a first class object at the file > descriptor level, in the style of kqueue. If it's relatively minor event > data, you could hook up a new kqueue event type. You could also just use > a special-purpose system call or sysctl if you don't mind a lot of context > switching and lack of buffering. > > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > robert@fledge.watson.org Network Associates Laboratories > > > > -- Marc Ramirez Blue Circle Software Corporation 513-688-1070 (main) 513-382-1270 (direct) www.bluecirclesoft.com From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 08:50:47 2003 Return-Path: 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 9C9A337B401 for ; Mon, 21 Jul 2003 08:50:47 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.SNVACAID.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11D1C43F3F for ; Mon, 21 Jul 2003 08:50:47 -0700 (PDT) (envelope-from kientzle@acm.org) Received: from acm.org ([66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id h6LFoksE020054; Mon, 21 Jul 2003 08:50:46 -0700 (PDT) (envelope-from kientzle@acm.org) Message-ID: <3F1C0C91.6050203@acm.org> Date: Mon, 21 Jul 2003 08:53:53 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.1) Gecko/20021005 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Leo Bicknell References: <3F1B0610.90803@acm.org> <20030720225041.GA26277@ussenterprise.ufp.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: Correct way to call execve? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kientzle@acm.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 15:50:47 -0000 Leo Bicknell wrote: > In a message written on Sun, Jul 20, 2003 at 02:13:52PM -0700, Tim Kientzle wrote: >>If I declare argv as "const char *", >>then the call to execve() warns about >>"incompatible pointer type" for the >>second argument. > > Almost, but the other order is important here, this passes gcc -Wall: > > #include > #include > > int main(int argc, char *const argv[], char *const envp[]) { > char *const execargv[] = { _PATH_BSHELL, NULL }; > > execve(_PATH_BSHELL,execargv,envp); > > return 0; > } Actually, this example passes -Wall if you declare "execargv" as simply "char *[]". However, I'm looking for something that passes gcc -Wwrite-strings, which this example does not. I honestly don't believe it is possible to call execve() in a const-correct fashion with -Wwrite-strings unless you copy over all of the arguments into non-const storage. I'd love to be proven wrong, though. Tim Kientzle From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 09:11:00 2003 Return-Path: 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 9398F37B401 for ; Mon, 21 Jul 2003 09:11:00 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DD5143FAF for ; Mon, 21 Jul 2003 09:11:00 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.9/8.12.6) with ESMTP id h6LGAxVI026806; Mon, 21 Jul 2003 09:11:00 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9/8.12.6/Submit) id h6LGAxpk026805; Mon, 21 Jul 2003 09:10:59 -0700 (PDT) Date: Mon, 21 Jul 2003 09:10:59 -0700 (PDT) From: Matthew Dillon Message-Id: <200307211610.h6LGAxpk026805@apollo.backplane.com> To: Peter Wemm References: <20030721055404.6EEB72A7EA@canning.wemm.org> cc: hackers@freebsd.org Subject: Re: Possible issue with in-kernel ELF loader. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 16:11:01 -0000 :> It turns out that the kernel's internal ELF loader is misinterpreting :> an ABS symbol (i.e. set with .SET in assembly) whos value is 0 as being :> 'not found', and once that is fixed it was also confusing the absolute :> symbol with a COMMON symbol. : :Thanks for the pointer. FWIW, We use -fno-common on 5.x to avoid common :symbols even existing in the first place. There were a few missing :externs that this turned up. : :Cheers, :-Peter :-- :Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com Hmm. Though you seem to override it for the linux and svr4 modules. It's a little too hackish for my tastes but I'll keep it in mind. There's something to be said for being able to clean up those kinds of declarations. -Matt Matthew Dillon From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 09:38:44 2003 Return-Path: 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 98AD737B401 for ; Mon, 21 Jul 2003 09:38:44 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90A8643F75 for ; Mon, 21 Jul 2003 09:38:43 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9/8.12.3) with ESMTP id h6LGcYFL039808; Mon, 21 Jul 2003 10:38:34 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 21 Jul 2003 10:38:27 -0600 (MDT) Message-Id: <20030721.103827.108269763.imp@bsdimp.com> To: molter@tin.it From: "M. Warner Losh" In-Reply-To: <20030721071842.GC58121@cobweb.example.org> References: <20030721071842.GC58121@cobweb.example.org> X-Mailer: Mew version 2.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: differences in USB support between FreeBSD 4.x and 5.x ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 16:38:44 -0000 In message: <20030721071842.GC58121@cobweb.example.org> Marco Molteni writes: : Any ideas, besides the "compare the USB source between 4.x and 5.x" : suggestion? ;-) USB hot plugging in 4.x sucks really bad. it is tolerably ok in 5.x for non-weird devices. Warner From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 09:57:41 2003 Return-Path: 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 617A437B408 for ; Mon, 21 Jul 2003 09:57:38 -0700 (PDT) Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE3FC43FA3 for ; Mon, 21 Jul 2003 09:57:36 -0700 (PDT) (envelope-from bicknell@ussenterprise.ufp.org) Received: from ussenterprise.ufp.org (bicknell@localhost [127.0.0.1]) by ussenterprise.ufp.org (8.12.9/8.12.9) with ESMTP id h6LGvZ8i056811 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 21 Jul 2003 12:57:35 -0400 (EDT) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.12.9/8.12.9/Submit) id h6LGvZFx056810; Mon, 21 Jul 2003 12:57:35 -0400 (EDT) Date: Mon, 21 Jul 2003 12:57:35 -0400 From: Leo Bicknell To: Tim Kientzle Message-ID: <20030721165735.GA56766@ussenterprise.ufp.org> Mail-Followup-To: Tim Kientzle , hackers@freebsd.org References: <3F1B0610.90803@acm.org> <20030720225041.GA26277@ussenterprise.ufp.org> <3F1C0C91.6050203@acm.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline In-Reply-To: <3F1C0C91.6050203@acm.org> Organization: United Federation of Planets X-PGP-Key: http://www.ufp.org/~bicknell/ cc: hackers@freebsd.org Subject: Re: Correct way to call execve? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 16:57:43 -0000 --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In a message written on Mon, Jul 21, 2003 at 08:53:53AM -0700, Tim Kientzle= wrote: > Actually, this example passes -Wall if you declare > "execargv" as simply "char *[]". However, I'm looking > for something that passes gcc -Wwrite-strings, which this > example does not. % cat exec.c #include #include int main(int argc, char *const argv[], char *const envp[]) { char *execargv[2]; execargv[0] =3D (char *)_PATH_BSHELL; execargv[1] =3D (char *)NULL; execve(_PATH_BSHELL,execargv,envp); return 0; } % cc -Wwrite-strings exec.c % cc -Wall exec.c Looks good to me. --=20 Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org --SLDf9lqlvOQaIe6s Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD4DBQE/HBt/Nh6mMG5yMTYRAireAKCGpkL4F+HaO2EtLIf0SkvxE+dINACVFkIC CAF2RcO7TZpZJAmjuExIGQ== =ymiB -----END PGP SIGNATURE----- --SLDf9lqlvOQaIe6s-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 10:15:43 2003 Return-Path: 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 0D67C37B401 for ; Mon, 21 Jul 2003 10:15:43 -0700 (PDT) Received: from colnta.issci.ca (mail.acns.AB.ca [142.179.151.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D11043F75 for ; Mon, 21 Jul 2003 10:15:42 -0700 (PDT) (envelope-from davidc@colnta.issci.ca) Received: from colnta.issci.ca (localhost [127.0.0.1]) by colnta.issci.ca (8.12.9/8.12.9) with ESMTP id h6LHFcPR021818; Mon, 21 Jul 2003 11:15:38 -0600 (MDT) (envelope-from davidc@colnta.issci.ca) Received: (from davidc@localhost) by colnta.issci.ca (8.12.9/8.12.9/Submit) id h6LHFcGQ021817; Mon, 21 Jul 2003 11:15:38 -0600 (MDT) Date: Mon, 21 Jul 2003 11:15:38 -0600 From: Chad David To: Tim Kientzle , hackers@freebsd.org Message-ID: <20030721171538.GA21656@colnta.acns.ab.ca> Mail-Followup-To: Tim Kientzle , hackers@freebsd.org References: <3F1B0610.90803@acm.org> <20030720225041.GA26277@ussenterprise.ufp.org> <3F1C0C91.6050203@acm.org> <20030721165735.GA56766@ussenterprise.ufp.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030721165735.GA56766@ussenterprise.ufp.org> User-Agent: Mutt/1.5.1i Subject: Re: Correct way to call execve? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 17:15:43 -0000 On Mon, Jul 21, 2003 at 12:57:35PM -0400, Leo Bicknell wrote: > In a message written on Mon, Jul 21, 2003 at 08:53:53AM -0700, Tim Kientzle wrote: > > Actually, this example passes -Wall if you declare > > "execargv" as simply "char *[]". However, I'm looking > > for something that passes gcc -Wwrite-strings, which this > > example does not. > > % cat exec.c > > #include > #include > > int main(int argc, char *const argv[], char *const envp[]) { > char *execargv[2]; > > execargv[0] = (char *)_PATH_BSHELL; > execargv[1] = (char *)NULL; > > execve(_PATH_BSHELL,execargv,envp); > > return 0; > } > % cc -Wwrite-strings exec.c > % cc -Wall exec.c > > Looks good to me. Try cc -Wwrite-strings -Wcast-qual exec.c. You cannot simply cast away a const. -- Chad David davidc@issci.ca www.FreeBSD.org davidc@freebsd.org ISSci Inc. Calgary, Alberta Canada From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 10:23:24 2003 Return-Path: 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 0694B37B401 for ; Mon, 21 Jul 2003 10:23:24 -0700 (PDT) Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3030543F3F for ; Mon, 21 Jul 2003 10:23:23 -0700 (PDT) (envelope-from bicknell@ussenterprise.ufp.org) Received: from ussenterprise.ufp.org (bicknell@localhost [127.0.0.1]) by ussenterprise.ufp.org (8.12.9/8.12.9) with ESMTP id h6LHNL8i057971 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 21 Jul 2003 13:23:21 -0400 (EDT) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.12.9/8.12.9/Submit) id h6LHNLLq057970; Mon, 21 Jul 2003 13:23:21 -0400 (EDT) Date: Mon, 21 Jul 2003 13:23:21 -0400 From: Leo Bicknell To: hackers@freebsd.org Message-ID: <20030721172321.GA57666@ussenterprise.ufp.org> Mail-Followup-To: hackers@freebsd.org, Tim Kientzle References: <3F1B0610.90803@acm.org> <20030720225041.GA26277@ussenterprise.ufp.org> <3F1C0C91.6050203@acm.org> <20030721165735.GA56766@ussenterprise.ufp.org> <20030721171538.GA21656@colnta.acns.ab.ca> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5vNYLRcllDrimb99" Content-Disposition: inline In-Reply-To: <20030721171538.GA21656@colnta.acns.ab.ca> Organization: United Federation of Planets X-PGP-Key: http://www.ufp.org/~bicknell/ cc: Tim Kientzle Subject: Re: Correct way to call execve? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 17:23:24 -0000 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In a message written on Mon, Jul 21, 2003 at 11:15:38AM -0600, Chad David w= rote: > Try cc -Wwrite-strings -Wcast-qual exec.c. >=20 > You cannot simply cast away a const. Grumble, will someone give me all the warnings you want turned on so I can work around all of them? :) % cat exec.c #include #include #include int main(int argc, char *const argv[], char *const envp[]) { char *const execargv[] =3D { strdup(_PATH_BSHELL), strdup(NULL) }; execve(_PATH_BSHELL,execargv,envp); return 0; } % cc -Wwrite-strings -Wcast-qual exec.c % cc -Wall exec.c --=20 Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org --5vNYLRcllDrimb99 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/HCGJNh6mMG5yMTYRAnNgAJ42vjyWK9d5qM3Krjm2fMIK3YY36gCdHADI OhuQhy6x/6VlYLWh0C2ZrHQ= =MSyT -----END PGP SIGNATURE----- --5vNYLRcllDrimb99-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 10:42:10 2003 Return-Path: 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 7F8E837B401 for ; Mon, 21 Jul 2003 10:42:10 -0700 (PDT) Received: from colnta.issci.ca (mail.acns.AB.ca [142.179.151.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EA4143F85 for ; Mon, 21 Jul 2003 10:42:09 -0700 (PDT) (envelope-from davidc@colnta.issci.ca) Received: from colnta.issci.ca (localhost [127.0.0.1]) by colnta.issci.ca (8.12.9/8.12.9) with ESMTP id h6LHg6PR021938; Mon, 21 Jul 2003 11:42:06 -0600 (MDT) (envelope-from davidc@colnta.issci.ca) Received: (from davidc@localhost) by colnta.issci.ca (8.12.9/8.12.9/Submit) id h6LHg6su021937; Mon, 21 Jul 2003 11:42:06 -0600 (MDT) Date: Mon, 21 Jul 2003 11:42:06 -0600 From: Chad David To: hackers@freebsd.org, Tim Kientzle Message-ID: <20030721174206.GA21892@colnta.acns.ab.ca> Mail-Followup-To: hackers@freebsd.org, Tim Kientzle References: <3F1B0610.90803@acm.org> <20030720225041.GA26277@ussenterprise.ufp.org> <3F1C0C91.6050203@acm.org> <20030721165735.GA56766@ussenterprise.ufp.org> <20030721171538.GA21656@colnta.acns.ab.ca> <20030721172321.GA57666@ussenterprise.ufp.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030721172321.GA57666@ussenterprise.ufp.org> User-Agent: Mutt/1.5.1i Subject: Re: Correct way to call execve? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 17:42:10 -0000 On Mon, Jul 21, 2003 at 01:23:21PM -0400, Leo Bicknell wrote: > In a message written on Mon, Jul 21, 2003 at 11:15:38AM -0600, Chad David wrote: > > Try cc -Wwrite-strings -Wcast-qual exec.c. > > > > You cannot simply cast away a const. > > Grumble, will someone give me all the warnings you want turned on so I > can work around all of them? :) > > % cat exec.c > > #include > #include > #include > > int main(int argc, char *const argv[], char *const envp[]) { > char *const execargv[] = { strdup(_PATH_BSHELL), strdup(NULL) }; > > execve(_PATH_BSHELL,execargv,envp); > > return 0; > } > % cc -Wwrite-strings -Wcast-qual exec.c > % cc -Wall exec.c You can/should probably skip the strdup(NULL), or ensure V in malloc.conf :). I assumed it was obvious that you could copy the data, but I believe the intent of the original question was to find an alternative. As far as I know there isn't one. A const is a const, except in C++. -- Chad David davidc@issci.ca www.FreeBSD.org davidc@freebsd.org ISSci Inc. Calgary, Alberta Canada From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 10:47:33 2003 Return-Path: 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 84D8337B40A; Mon, 21 Jul 2003 10:47:28 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9B8D43F85; Mon, 21 Jul 2003 10:47:27 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfmrb.dialup.mindspring.com ([165.247.219.107] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19eekv-0002nK-00; Mon, 21 Jul 2003 10:47:26 -0700 Message-ID: <3F1C26CA.9F2AE361@mindspring.com> Date: Mon, 21 Jul 2003 10:45:46 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Robert Watson References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4544062055edda48ac8dafe9cec895b7b548b785378294e88350badd9bab72f9c350badd9bab72f9c cc: deischen@freebsd.org cc: freebsd-hackers@freebsd.org cc: Marc Ramirez Subject: Re: Communications kernel -> userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 17:47:39 -0000 Robert Watson wrote: > Of these approaches, my favorite are writing directly to a file, and using > a psuedo-device, depending on the requirements. They have fairly > well-defined security semantics (especially if you properly cache the > open-time credentials in the file case). I don't really like the Fifo > case as it has to re-look-up the fifo each time, and has some odd blocking > semantics. Sockets, as I said, involve a lot of special casing, so unless > you're already dealing with network code, you probably don't want to drag > it into the mix. If you're creating big new infrastructure for a feature, > I suppose you could also hook it up as a first class object at the file > descriptor level, in the style of kqueue. If it's relatively minor event > data, you could hook up a new kqueue event type. You could also just use > a special-purpose system call or sysctl if you don't mind a lot of context > switching and lack of buffering. I like setting the PG_G bit on the page involved, which maps it into the address space of all processes. 8-). -- Terry From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 10:52:16 2003 Return-Path: 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 2B09237B401 for ; Mon, 21 Jul 2003 10:52:16 -0700 (PDT) Received: from gta.com (mailgate.gta.com [199.120.225.4]) by mx1.FreeBSD.org (Postfix) with SMTP id 6FC6343F93 for ; Mon, 21 Jul 2003 10:52:15 -0700 (PDT) (envelope-from lab@gta.com) Received: (qmail 16862 invoked by uid 1000); 21 Jul 2003 17:52:14 -0000 Date: 21 Jul 2003 17:52:14 -0000 Message-ID: <20030721175214.16861.qmail@gta.com> From: Larry Baird To: hackers@freebsd.org In-Reply-To: <20030721.103827.108269763.imp@bsdimp.com> User-Agent: tin/1.5.9-20010723 ("Chord of Souls") (UNIX) (FreeBSD/4.5-RELEASE-p3 (i386)) Subject: Re: differences in USB support between FreeBSD 4.x and 5.x ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 17:52:16 -0000 In article <20030721.103827.108269763.imp@bsdimp.com> you wrote: > In message: <20030721071842.GC58121@cobweb.example.org> > Marco Molteni writes: > : Any ideas, besides the "compare the USB source between 4.x and 5.x" > : suggestion? ;-) > > USB hot plugging in 4.x sucks really bad. it is tolerably ok in 5.x > for non-weird devices. 5.x seems to have much better support for USB 2.0 as well. I have a SanDisk 2.0 USB compact flash reader that just works with 5.1 release. So far no amount of kernel hacking has made it work with 4.8. Unfortunetly for me I need it to work under 4.8. )-: Larry -- ------------------------------------------------------------------------ Larry Baird | http://www.gta.com Global Technology Associates, Inc. | Orlando, FL Email: lab@gta.com | TEL 407-380-0220, FAX 407-380-6080 From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 11:18:03 2003 Return-Path: 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 4560B37B401 for ; Mon, 21 Jul 2003 11:18:03 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 729A143FDF for ; Mon, 21 Jul 2003 11:18:02 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 565653ABB4D; Mon, 21 Jul 2003 20:18:06 +0200 (CEST) Date: Mon, 21 Jul 2003 20:18:06 +0200 From: Pawel Jakub Dawidek To: freebsd-hackers@freebsd.org Message-ID: <20030721181805.GA43543@garage.freebsd.pl> References: <20030720235759.GJ437@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <20030720235759.GJ437@garage.freebsd.pl> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.8-RELEASE i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i cc: dillon@apollo.backplane.com Subject: Re: VM problem... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 18:18:03 -0000 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 21, 2003 at 01:57:59AM +0200, Pawel Jakub Dawidek wrote: +> So as you can see I'm listing every entry that isn't writable. +> This function is called when process is killed by kernel with SIGBUS. +> It shows me that only this region isn't writable: +>=20 +> ENTRY:: 0-0xbfc00000 (0:0) Of course it isn't it. I've changed all map entries protection to VM_PROT_ALL and now on SIGBUS (in trapsignal()) every listed entry got protection =3D VM_PROT_ALL and max_protection =3D VM_PROT_ALL. So what the hell is going on here?:S I'm not a VM expert so please help me to track this down. I'm trying real hard to made this by myself for a week now. Is there posibility that there is some map entry that isn't on process p->p_vmspace->vm_map? Maybe some shared entry not connected with his map, but which should be accessable for this process? If trap is generated, because of illegal access nothing is changed with map entries before trapsignal() is called? I'm really confused, so if someone could find few minutes, hour or short day:) to help me track this down, I'll be really grateful. --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPxwuXT/PhmMH/Mf1AQHDUwP+Pg+iws+uH4mYOrwRwrJdA/Jd9Qibofpx cMmiW3jhc6kIMyNoYTzwpg/rL/3pwP+7iwSTX66DYtpjZPGD/OwHIB/c9IOWVzB7 QiC1a7zN3ZywObWPIxCaxRkO+vHQWDNXQZGBGz8nuJzMa/HFvSB/DkgaxNy5BybT 7wfbv7cimJ4= =/FGJ -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 11:21:15 2003 Return-Path: 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 37AE537B401; Mon, 21 Jul 2003 11:21:15 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 491F443FB1; Mon, 21 Jul 2003 11:21:14 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9/8.12.9) with ESMTP id h6LIKeai099570; Mon, 21 Jul 2003 14:20:40 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h6LIKeiZ099567; Mon, 21 Jul 2003 14:20:40 -0400 (EDT) Date: Mon, 21 Jul 2003 14:20:40 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Terry Lambert In-Reply-To: <3F1C26CA.9F2AE361@mindspring.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: deischen@freebsd.org cc: freebsd-hackers@freebsd.org cc: Marc Ramirez Subject: Re: Communications kernel -> userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 18:21:15 -0000 On Mon, 21 Jul 2003, Terry Lambert wrote: > Robert Watson wrote: > > Of these approaches, my favorite are writing directly to a file, and using > > a psuedo-device, depending on the requirements. They have fairly > > well-defined security semantics (especially if you properly cache the > > open-time credentials in the file case). I don't really like the Fifo > > case as it has to re-look-up the fifo each time, and has some odd blocking > > semantics. Sockets, as I said, involve a lot of special casing, so unless > > you're already dealing with network code, you probably don't want to drag > > it into the mix. If you're creating big new infrastructure for a feature, > > I suppose you could also hook it up as a first class object at the file > > descriptor level, in the style of kqueue. If it's relatively minor event > > data, you could hook up a new kqueue event type. You could also just use > > a special-purpose system call or sysctl if you don't mind a lot of context > > switching and lack of buffering. > > I like setting the PG_G bit on the page involved, which maps it into the > address space of all processes. 8-). For one of our research projects, here at NAI, we did a fair amount of userland network code prototyping. We started out with IPDIVERT, then pushed down to BPF using a partial network stack in userspace. We've found it's a lot easier on competent network developers who are unfamiliar with the FreeBSD kernel code, not to mention easier on debugging. We never got so far on that project as to do shared memory between the kernel and userspace, but I know that that's been done by at least a couple of companies at various points to reduce copying and context switch costs for userspace test frameworks. One of the things I'd really like to see if some decent "throw packets between kernel and userspace" primitive bits, such that the kernel has a useful and logical way to expose buffer data into directly mapped user pages, and an appropriate notification and management system to reuse memory, etc. Something that looks a bit like the relationship between kernel device drivers and devices when it comes to DMA management. Do you know if any such framework exists? (Specifically targetted at exposing network packets...) (Ideally not requiring privilege in the user process, nor involving nasty integrity or confidentiality problems :-) Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 11:21:41 2003 Return-Path: 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 3C55D37B401 for ; Mon, 21 Jul 2003 11:21:41 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.SNVACAID.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89CF843FA3 for ; Mon, 21 Jul 2003 11:21:40 -0700 (PDT) (envelope-from kientzle@acm.org) Received: from acm.org ([66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id h6LILasE020622; Mon, 21 Jul 2003 11:21:40 -0700 (PDT) (envelope-from kientzle@acm.org) Message-ID: <3F1C2FEB.4070801@acm.org> Date: Mon, 21 Jul 2003 11:24:43 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.1) Gecko/20021005 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Chad David References: <3F1B0610.90803@acm.org> <20030720225041.GA26277@ussenterprise.ufp.org> <3F1C0C91.6050203@acm.org> <20030721165735.GA56766@ussenterprise.ufp.org> <20030721171538.GA21656@colnta.acns.ab.ca> <20030721172321.GA57666@ussenterprise.ufp.org> <20030721174206.GA21892@colnta.acns.ab.ca> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: Correct way to call execve? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kientzle@acm.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 18:21:41 -0000 Chad David wrote: > I assumed it was obvious that you could copy the data, but I believe > the intent of the original question was to find an alternative. As > far as I know there isn't one. A const is a const, except in C++. Yes, the intent was to find a way to avoid copying the data. I was hoping that someone knew a standard way to say "yes, I really do mean to cast away that const," akin to C++ const_cast. As far as I can tell, the POSIX-mandated declaration of execvp is simply wrong. (SUSv3 even has a comment that essentially admits this fact and then vainly tries to rationalize it. ) Basically, there is no const-correct way to invoke execvp using literal strings for argv except to copy the strings. In particular, the FreeBSD implementation of popen(), for example, cannot be compiled with strict warnings. Tim From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 11:52:19 2003 Return-Path: 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 E428237B401 for ; Mon, 21 Jul 2003 11:52:19 -0700 (PDT) Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A4CA43F3F for ; Mon, 21 Jul 2003 11:52:19 -0700 (PDT) (envelope-from bicknell@ussenterprise.ufp.org) Received: from ussenterprise.ufp.org (bicknell@localhost [127.0.0.1]) by ussenterprise.ufp.org (8.12.9/8.12.9) with ESMTP id h6LIqH8i061433 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 21 Jul 2003 14:52:17 -0400 (EDT) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.12.9/8.12.9/Submit) id h6LIqH3q061432; Mon, 21 Jul 2003 14:52:17 -0400 (EDT) Date: Mon, 21 Jul 2003 14:52:17 -0400 From: Leo Bicknell To: Tim Kientzle Message-ID: <20030721185217.GA60600@ussenterprise.ufp.org> Mail-Followup-To: Tim Kientzle , Chad David , hackers@freebsd.org References: <3F1B0610.90803@acm.org> <20030720225041.GA26277@ussenterprise.ufp.org> <3F1C0C91.6050203@acm.org> <20030721165735.GA56766@ussenterprise.ufp.org> <20030721171538.GA21656@colnta.acns.ab.ca> <20030721172321.GA57666@ussenterprise.ufp.org> <20030721174206.GA21892@colnta.acns.ab.ca> <3F1C2FEB.4070801@acm.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OgqxwSJOaUobr8KG" Content-Disposition: inline In-Reply-To: <3F1C2FEB.4070801@acm.org> Organization: United Federation of Planets X-PGP-Key: http://www.ufp.org/~bicknell/ cc: hackers@freebsd.org cc: Chad David Subject: Re: Correct way to call execve? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 18:52:20 -0000 --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In a message written on Mon, Jul 21, 2003 at 11:24:43AM -0700, Tim Kientzle= wrote: > I was hoping that someone knew a standard way to > say "yes, I really do mean to cast away that const," > akin to C++ const_cast. I'm missing something here. You can do that, but you can't do that with say "-Wcast-qual", which is basically a flag to say "I don't care what the code says, tell me about those situations". > Basically, there is no const-correct way to > invoke execvp using literal strings for argv except > to copy the strings. In particular, the > FreeBSD implementation of popen(), for example, cannot be > compiled with strict warnings. Depends on what you call correct. "cc" compiles it quietly. "cc -Wall" compiles quietly. "cc -ansi" compiles quietly. "cc -pedantic" compiles quietly. Sure, there are options you can turn on that show you these /warnings/, but that doesn't mean those options are actually showing you problems with your code. Just because you can run "cc -nostdlib" doesn't mean all code that fails to compile is "broken", it means you used the wrong option. Similarly, if you do things in your program that require constants to not be, then turning on an option to warn you about that seems a bit backwards as well. --=20 Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org --OgqxwSJOaUobr8KG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/HDZhNh6mMG5yMTYRAnIyAJoCkGWGyGcBPYmtYCNKm6M381AyIwCfSRsI TquARh+PNPpGr/nEF1nRkuk= =7RaQ -----END PGP SIGNATURE----- --OgqxwSJOaUobr8KG-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 11:59:31 2003 Return-Path: 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 754C937B401 for ; Mon, 21 Jul 2003 11:59:31 -0700 (PDT) Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09BC343FAF for ; Mon, 21 Jul 2003 11:59:30 -0700 (PDT) (envelope-from bicknell@ussenterprise.ufp.org) Received: from ussenterprise.ufp.org (bicknell@localhost [127.0.0.1]) by ussenterprise.ufp.org (8.12.9/8.12.9) with ESMTP id h6LIxS8i061823 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 21 Jul 2003 14:59:28 -0400 (EDT) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.12.9/8.12.9/Submit) id h6LIxSUM061822; Mon, 21 Jul 2003 14:59:28 -0400 (EDT) Date: Mon, 21 Jul 2003 14:59:28 -0400 From: Leo Bicknell To: Tim Kientzle , Chad David , hackers@freebsd.org Message-ID: <20030721185928.GA61664@ussenterprise.ufp.org> Mail-Followup-To: Tim Kientzle , Chad David , hackers@freebsd.org References: <3F1B0610.90803@acm.org> <20030720225041.GA26277@ussenterprise.ufp.org> <3F1C0C91.6050203@acm.org> <20030721165735.GA56766@ussenterprise.ufp.org> <20030721171538.GA21656@colnta.acns.ab.ca> <20030721172321.GA57666@ussenterprise.ufp.org> <20030721174206.GA21892@colnta.acns.ab.ca> <3F1C2FEB.4070801@acm.org> <20030721185217.GA60600@ussenterprise.ufp.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fdj2RfSjLxBAspz7" Content-Disposition: inline In-Reply-To: <20030721185217.GA60600@ussenterprise.ufp.org> Organization: United Federation of Planets X-PGP-Key: http://www.ufp.org/~bicknell/ Subject: Re: Correct way to call execve? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 18:59:31 -0000 --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable You know, my own thinking made me figure this one out: % cat exec.c #include #include #include int main(int argc, char *const argv[], char *const envp[]) { char *const execargv[] =3D { _PATH_BSHELL, NULL }; execve(_PATH_BSHELL,execargv,NULL); return 0; } % cc -fwritable-strings -Wcast-qual -Wwrite-strings exec.c % There you go. By default strings are read-only, and indeed smart compilers use that to compress them and do other nifty tricks. However, in this case you really want a string to be "char *", eg writable. So, tell the compiler to do that with "-fwritable-strings", poof, strings are now "char *", the cast away the cost problem goes away, "-Wcast-qual" works fine. It always seemed to me a lot of things included -fwritable-strings for no good reason, maybe this is part of the reason. :) --=20 Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org --fdj2RfSjLxBAspz7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/HDgQNh6mMG5yMTYRAss6AJ9B2Gsn12fNl7q1vbgFdZVVIfde4wCfXPt3 358e2u8S2Z0Tb0wYk6V/mvI= =ThYH -----END PGP SIGNATURE----- --fdj2RfSjLxBAspz7-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 12:01:38 2003 Return-Path: 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 E34BF37B404; Mon, 21 Jul 2003 12:01:37 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5637E43FBF; Mon, 21 Jul 2003 12:01:35 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 535653ABB51; Mon, 21 Jul 2003 21:01:46 +0200 (CEST) Date: Mon, 21 Jul 2003 21:01:46 +0200 From: Pawel Jakub Dawidek To: Robert Watson Message-ID: <20030721190146.GB43543@garage.freebsd.pl> References: <3F1C26CA.9F2AE361@mindspring.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="gatW/ieO32f1wygP" Content-Disposition: inline In-Reply-To: X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.8-RELEASE i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i cc: deischen@freebsd.org cc: Marc Ramirez cc: freebsd-hackers@freebsd.org Subject: Re: Communications kernel -> userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 19:01:38 -0000 --gatW/ieO32f1wygP Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 21, 2003 at 02:20:40PM -0400, Robert Watson wrote: +> For one of our research projects, here at NAI, we did a fair amount of +> userland network code prototyping. We started out with IPDIVERT, then +> pushed down to BPF using a partial network stack in userspace. We've +> found it's a lot easier on competent network developers who are unfamili= ar +> with the FreeBSD kernel code, not to mention easier on debugging. We +> never got so far on that project as to do shared memory between the kern= el +> and userspace, but I know that that's been done by at least a couple of +> companies at various points to reduce copying and context switch costs f= or +> userspace test frameworks. One of the things I'd really like to see if +> some decent "throw packets between kernel and userspace" primitive bits, +> such that the kernel has a useful and logical way to expose buffer data +> into directly mapped user pages, and an appropriate notification and +> management system to reuse memory, etc. Something that looks a bit like +> the relationship between kernel device drivers and devices when it comes +> to DMA management. Do you know if any such framework exists?=20 +> (Specifically targetted at exposing network packets...) (Ideally not +> requiring privilege in the user process, nor involving nasty integrity or +> confidentiality problems :-) It will be cool to have something like this: mark(vm_map_t map, vm_offset_t start, vm_offset_t end); unmark(vm_map_t map, vm_offset_t start, vm_offset_t end); It will be used instead of copyin()/copyout() functions. For example syscall is marking some range with mark() function. For now on this range isn't accessable from userland. If process will try to write to this page, page is copied (copy-on-write). If this page will be modified by kernel it will be marked as MODIFIED. Now when syscall will call unmark() on this range we could get two scenarious: 1. Page is marked as MODIFIED (by kernel) so userland copy of this page (if it exists of course) is destroyed and this page will be putted in its place. This is replacement for copyin() and then copyout() or just copyout().. 2. Page isn't marked as MODIFIED, so kernel version of page is destroyed (is there is userland version). This is replacement for just copyin(). There could be other ways. Thread/process could be locked if it is trying to access memory marked with mark() function. And this, I think, don't hit performance, because this happends really rarely. So maybe it is better to lock thread for a moment instead of doplicating page, but I don't think so. --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --gatW/ieO32f1wygP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPxw4mj/PhmMH/Mf1AQFHJgQAhmL+efRYAoqHqt901KJkS3gN2liALvgK qov9peIIoioTpXjv2wn3ZOrrkMM4x4eCPP77HRLEmIVHgrLcyK3O5H5Y7OOY9pf2 BTUzlloJKTdCz3wr2tts2m5k2SuGCMrtRPQVvO79+iFjiq4ebC124ndIN1iBc/uT DTILD8jZiWg= =E/g2 -----END PGP SIGNATURE----- --gatW/ieO32f1wygP-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 12:04:00 2003 Return-Path: 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 268D737B401 for ; Mon, 21 Jul 2003 12:04:00 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E55443F75 for ; Mon, 21 Jul 2003 12:03:59 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.9/8.12.6) with ESMTP id h6LJ3xVI027537; Mon, 21 Jul 2003 12:03:59 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9/8.12.6/Submit) id h6LJ3xrX027536; Mon, 21 Jul 2003 12:03:59 -0700 (PDT) Date: Mon, 21 Jul 2003 12:03:59 -0700 (PDT) From: Matthew Dillon Message-Id: <200307211903.h6LJ3xrX027536@apollo.backplane.com> To: Pawel Jakub Dawidek References: <20030720235759.GJ437@garage.freebsd.pl> <20030721181805.GA43543@garage.freebsd.pl> cc: freebsd-hackers@freebsd.org Subject: Re: VM problem... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 19:04:00 -0000 Hmm. Is the VM object properly sized? Any attempt to fault-in data beyond a VM object's EOF, regardless of how you set the map_entry permissions, will seg fault or bus fault. -Matt Matthew Dillon : : :--LZvS9be/3tNcYl/X :Content-Type: text/plain; charset=iso-8859-2 :Content-Disposition: inline :Content-Transfer-Encoding: quoted-printable : :On Mon, Jul 21, 2003 at 01:57:59AM +0200, Pawel Jakub Dawidek wrote: :+> So as you can see I'm listing every entry that isn't writable. :+> This function is called when process is killed by kernel with SIGBUS. :+> It shows me that only this region isn't writable: :+>=20 :+> ENTRY:: 0-0xbfc00000 (0:0) : :Of course it isn't it. I've changed all map entries protection to :VM_PROT_ALL and now on SIGBUS (in trapsignal()) every listed entry :got protection =3D VM_PROT_ALL and max_protection =3D VM_PROT_ALL. :So what the hell is going on here?:S : :I'm not a VM expert so please help me to track this down. I'm trying :real hard to made this by myself for a week now. : :Is there posibility that there is some map entry that isn't on process :p->p_vmspace->vm_map? Maybe some shared entry not connected with his :map, but which should be accessable for this process? : :If trap is generated, because of illegal access nothing is changed :with map entries before trapsignal() is called? : :I'm really confused, so if someone could find few minutes, hour or short :day:) to help me track this down, I'll be really grateful. : :--=20 :Pawel Jakub Dawidek pawel@dawidek.net :UNIX Systems Programmer/Administrator http://garage.freebsd.pl :Am I Evil? Yes, I Am! http://cerber.sourceforge.net : :--LZvS9be/3tNcYl/X :Content-Type: application/pgp-signature :Content-Disposition: inline : :-----BEGIN PGP SIGNATURE----- :Version: GnuPG v1.0.7 (FreeBSD) : :iQCVAwUBPxwuXT/PhmMH/Mf1AQHDUwP+Pg+iws+uH4mYOrwRwrJdA/Jd9Qibofpx :cMmiW3jhc6kIMyNoYTzwpg/rL/3pwP+7iwSTX66DYtpjZPGD/OwHIB/c9IOWVzB7 :QiC1a7zN3ZywObWPIxCaxRkO+vHQWDNXQZGBGz8nuJzMa/HFvSB/DkgaxNy5BybT :7wfbv7cimJ4= :=/FGJ :-----END PGP SIGNATURE----- : :--LZvS9be/3tNcYl/X-- : From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 12:16:07 2003 Return-Path: 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 3166537B404 for ; Mon, 21 Jul 2003 12:16:07 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7F5A43F3F for ; Mon, 21 Jul 2003 12:16:04 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 1C5E03ABB53; Mon, 21 Jul 2003 21:16:22 +0200 (CEST) Date: Mon, 21 Jul 2003 21:16:22 +0200 From: Pawel Jakub Dawidek To: Matthew Dillon Message-ID: <20030721191622.GC43543@garage.freebsd.pl> References: <20030720235759.GJ437@garage.freebsd.pl> <20030721181805.GA43543@garage.freebsd.pl> <200307211903.h6LJ3xrX027536@apollo.backplane.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="Y5rl02BVI9TCfPar" Content-Disposition: inline In-Reply-To: <200307211903.h6LJ3xrX027536@apollo.backplane.com> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.8-RELEASE i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i cc: freebsd-hackers@freebsd.org Subject: Re: VM problem... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 19:16:07 -0000 --Y5rl02BVI9TCfPar Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 21, 2003 at 12:03:59PM -0700, Matthew Dillon wrote: +> Hmm. Is the VM object properly sized? Any attempt to fault-in data +> beyond a VM object's EOF, regardless of how you set the map_entry +> permissions, will seg fault or bus fault. I'm allocationg memory with obreak() function (so vm_map_find() function is used to find space). But if I try to allocate size (and size is small), obreak() will allocate more memory. end =3D vm->vm_daddr + ctob(vm->vm_dsize); obreak(vm, end + size); vm_map_protect(&vm->vm_map, end, end + size, VM_PROT_READ); And vm_map_protect() will create new map entry (it should, right?) with entry->start =3D end and entry->end =3D end + size. But what happend with those entries when execve() is called? Because process' map catched before execve() doesn't exists after execve() is called. So maybe those entries (with VM_PROT_READ) are reused somehow? THANKS! --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --Y5rl02BVI9TCfPar Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPxw8Bj/PhmMH/Mf1AQHbFAQAht6f+snT/al5hUyaIYiX/xQ/uiuqCCJX niBwcuLkoRN3nKWY8kIQs2OPuDAhjFK9Ffr92VL/5Im5fJW7Uj/BmKppECAjnwxm Hz6FrkIfT9SZnwcusrHJsrsnDtsmL/BcfEv54jSjYO1b9zadWGajOE25xdhOAS/z ATu/kaSbSNQ= =LHzU -----END PGP SIGNATURE----- --Y5rl02BVI9TCfPar-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 12:32:19 2003 Return-Path: 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 D29E737B401 for ; Mon, 21 Jul 2003 12:32:19 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D58943FBD for ; Mon, 21 Jul 2003 12:32:19 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.9/8.12.6) with ESMTP id h6LJWJVI027713; Mon, 21 Jul 2003 12:32:19 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9/8.12.6/Submit) id h6LJWJuM027712; Mon, 21 Jul 2003 12:32:19 -0700 (PDT) Date: Mon, 21 Jul 2003 12:32:19 -0700 (PDT) From: Matthew Dillon Message-Id: <200307211932.h6LJWJuM027712@apollo.backplane.com> To: Pawel Jakub Dawidek References: <20030720235759.GJ437@garage.freebsd.pl> <20030721181805.GA43543@garage.freebsd.pl> <20030721191622.GC43543@garage.freebsd.pl> cc: freebsd-hackers@freebsd.org Subject: Re: VM problem... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 19:32:20 -0000 : end =3D vm->vm_daddr + ctob(vm->vm_dsize); : obreak(vm, end + size); : vm_map_protect(&vm->vm_map, end, end + size, VM_PROT_READ); : :And vm_map_protect() will create new map entry (it should, right?) :with entry->start =3D end and entry->end =3D end + size. : :But what happend with those entries when execve() is called? :Because process' map catched before execve() doesn't exists after :execve() is called. So maybe those entries (with VM_PROT_READ) are :reused somehow? : :THANKS! : :--=20 :Pawel Jakub Dawidek pawel@dawidek.net Hmm. Well, when a process forks the vm_map_entry's fork along with it. The underlying VM objects remain shared but become copy-on-write. It sounds like whatever you are doing is messing up the user stack, and the program is bus-faulting when it can't write to the user stack. All sorts of things have to write to the user stack, including the signal trampoline code and even execve(). The fault address you reported earlier, 0xbfbffc20, is on the user stack. -Matt From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 12:53:37 2003 Return-Path: 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 7237937B41A for ; Mon, 21 Jul 2003 12:53:37 -0700 (PDT) Received: from hysteria.spc.org (hysteria.spc.org [195.206.69.234]) by mx1.FreeBSD.org (Postfix) with SMTP id 3E3F543F85 for ; Mon, 21 Jul 2003 12:53:36 -0700 (PDT) (envelope-from bms@hysteria.spc.org) Received: (qmail 16492 invoked by uid 5013); 21 Jul 2003 19:51:19 -0000 Date: Mon, 21 Jul 2003 20:51:19 +0100 From: Bruce M Simpson To: Pawel Jakub Dawidek Message-ID: <20030721195119.GG22295@spc.org> Mail-Followup-To: Bruce M Simpson , Pawel Jakub Dawidek , Matthew Dillon , freebsd-hackers@freebsd.org References: <20030720235759.GJ437@garage.freebsd.pl> <20030721181805.GA43543@garage.freebsd.pl> <200307211903.h6LJ3xrX027536@apollo.backplane.com> <20030721191622.GC43543@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030721191622.GC43543@garage.freebsd.pl> User-Agent: Mutt/1.4.1i cc: freebsd-hackers@freebsd.org cc: Matthew Dillon Subject: Re: VM problem... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 19:53:37 -0000 Hi Pawel, On Mon, Jul 21, 2003 at 09:16:22PM +0200, Pawel Jakub Dawidek wrote: > I'm allocationg memory with obreak() function (so vm_map_find() function > is used to find space). But if I try to allocate size (and size is small), > obreak() will allocate more memory. You may find the vm_map and pmap documentation which I have just submitted to the project helpful for reference:- http://www.freebsd.org/cgi/query-pr.cgi?pr=docs/54691 http://www.freebsd.org/cgi/query-pr.cgi?pr=docs/54632 and ref: our online conversation about the vm_map_insert() semantics (and possible failure mode re: NULL vm_object argument for the user process case). Regards, BMS From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 14:21:12 2003 Return-Path: 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 A85F937B404; Mon, 21 Jul 2003 14:21:12 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BEC443FA3; Mon, 21 Jul 2003 14:21:11 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9/8.12.9) with ESMTP id h6LLKbai001057; Mon, 21 Jul 2003 17:20:37 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h6LLKbYo001054; Mon, 21 Jul 2003 17:20:37 -0400 (EDT) Date: Mon, 21 Jul 2003 17:20:37 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Pawel Jakub Dawidek In-Reply-To: <20030721190146.GB43543@garage.freebsd.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: deischen@freebsd.org cc: Marc Ramirez cc: freebsd-hackers@freebsd.org Subject: Re: Communications kernel -> userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 21:21:13 -0000 On Mon, 21 Jul 2003, Pawel Jakub Dawidek wrote: > For example syscall is marking some range with mark() function. For now > on this range isn't accessable from userland. If process will try to > write to this page, page is copied (copy-on-write). If this page will > be modified by kernel it will be marked as MODIFIED. Now when syscall > will call unmark() on this range we could get two scenarious: > > 1. Page is marked as MODIFIED (by kernel) so userland copy > of this page (if it exists of course) is destroyed and > this page will be putted in its place. > This is replacement for copyin() and then copyout() or > just copyout().. > 2. Page isn't marked as MODIFIED, so kernel version of page > is destroyed (is there is userland version). > This is replacement for just copyin(). > > There could be other ways. Thread/process could be locked if it is > trying to access memory marked with mark() function. And this, I think, > don't hit performance, because this happends really rarely. So maybe it > is better to lock thread for a moment instead of doplicating page, but I > don't think so. This sounds a bit like some of the IO Lite stuff -- moving to a page-centric model for IO interfaces to avoid copy operations, in many cases able to share pages between applications, buffer cache, network buffers, etc. Take a look at: http://www.cs.princeton.edu/~vivek/ For some details. Some of the benefits of this approach are captured in the common case through sendfile(), in practice, but it's definitely worth a read. I guess what I had in mind was something more network-specific, with interfaces optimized for memory mapped network packet streams. In the simplest case, something like memory-mapping the BPF buffer from kernel space to userspace, with some sort of simple stream synchronization so that the user application could notify the kernel as to when it could reuse bits of the buffer, but avoiding copy operations and lots of context switching. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 14:30:26 2003 Return-Path: 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 253BF37B401 for ; Mon, 21 Jul 2003 14:30:26 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 354F543F93 for ; Mon, 21 Jul 2003 14:30:24 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 883D23ABB4D; Mon, 21 Jul 2003 23:30:37 +0200 (CEST) Date: Mon, 21 Jul 2003 23:30:37 +0200 From: Pawel Jakub Dawidek To: Matthew Dillon Message-ID: <20030721213037.GD43543@garage.freebsd.pl> References: <20030720235759.GJ437@garage.freebsd.pl> <20030721181805.GA43543@garage.freebsd.pl> <200307211903.h6LJ3xrX027536@apollo.backplane.com> <20030721191622.GC43543@garage.freebsd.pl> <200307211932.h6LJWJuM027712@apollo.backplane.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="48TaNjbzBVislYPb" Content-Disposition: inline In-Reply-To: <200307211932.h6LJWJuM027712@apollo.backplane.com> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.8-RELEASE i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i cc: freebsd-hackers@freebsd.org Subject: Re: VM problem... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 21:30:26 -0000 --48TaNjbzBVislYPb Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 21, 2003 at 12:32:19PM -0700, Matthew Dillon wrote: +> Hmm. Well, when a process forks the vm_map_entry's fork along with +> it. The underlying VM objects remain shared but become copy-on-writ= e. Yes, but I mean while execve(), not fork(). Before execve() is called map got for example 65 pages in its vm map. One of this page is marked as read-only. After execve() process vm map got only 2 pages. I susspect, that pages from before execve() are floating around. And this read-only pages also and maybe it can be reused for stack? If not, what happend with them? --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --48TaNjbzBVislYPb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPxxbfT/PhmMH/Mf1AQHtygQAk+hqOjxo1cQT/5tfViUXXU7xPxZF9Vff 0g2cw6+/CVqsVKAFL3okmZC7OQBwN+UqXYUR/96la3qIL+TK7KvNcRg1eCAMJR98 qKpclJRd8z3XMFGs3FqnT78J0pR+mQvkXbcjy/YbaF7JxyEL06Kq/Zg3D9cgZav6 fWfIa2uDCCQ= =LqE1 -----END PGP SIGNATURE----- --48TaNjbzBVislYPb-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 14:59:16 2003 Return-Path: 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 174E837B401 for ; Mon, 21 Jul 2003 14:59:16 -0700 (PDT) Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FFF243FA3 for ; Mon, 21 Jul 2003 14:59:15 -0700 (PDT) (envelope-from des@des.no) Received: from smtp.des.no (37.80-203-228.nextgentel.com [80.203.228.37]) by mail.broadpark.no (Postfix) with ESMTP id E0AD078CBA; Mon, 21 Jul 2003 23:59:13 +0200 (MEST) Received: by smtp.des.no (Pony Express, from userid 666) id 0A5C19636F; Mon, 21 Jul 2003 23:40:08 +0200 (CEST) Received: from dwp.des.no (dwp.des.no [10.0.0.4]) by smtp.des.no (Pony Express) with ESMTP id 01D0A96215; Mon, 21 Jul 2003 23:40:06 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id BFB3AB822; Mon, 21 Jul 2003 23:40:05 +0200 (CEST) To: netch@lucky.net References: <20030718091248.GO76126@lucky.net> From: des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) Date: Mon, 21 Jul 2003 23:40:05 +0200 In-Reply-To: <20030718091248.GO76126@lucky.net> (Valentin Nechayev's message of "Fri, 18 Jul 2003 12:12:48 +0300") Message-ID: User-Agent: Gnus/5.090024 (Oort Gnus v0.24) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, hits=-3.0 required=8.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_GNUS_UA version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: hackers@freebsd.org Subject: Re: complicated downgrade X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 21:59:16 -0000 Valentin Nechayev writes: > I need to downgrade a remote FreeBSD system from 5.1-release to 4.8-relea= se > remotely without any local help (except possible hitting Reset). Maybe if you tell us why you need to do this we can figure out a way for you to avoid doing it? DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 15:02:41 2003 Return-Path: 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 9F2CC37B401 for ; Mon, 21 Jul 2003 15:02:41 -0700 (PDT) Received: from Danovitsch.dnsq.org (b74143.upc-b.chello.nl [212.83.74.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF3B443FAF for ; Mon, 21 Jul 2003 15:02:39 -0700 (PDT) (envelope-from Danovitsch@Vitsch.net) Received: from FreeBSD.Danovitsch.LAN (b83007.upc-b.chello.nl [212.83.83.7]) by Danovitsch.dnsq.org (8.12.3p2/8.11.3) with ESMTP id h6LLuZak077479; Mon, 21 Jul 2003 23:56:36 +0200 (CEST) (envelope-from Danovitsch@Vitsch.net) Content-Type: text/plain; charset="iso-8859-1" From: "Daan Vreeken [PA4DAN]" To: ticso@cicely.de Date: Tue, 22 Jul 2003 00:04:21 +0200 User-Agent: KMail/1.4.3 References: <20030721071842.GC58121@cobweb.example.org> <20030721130013.GI19386@cicely12.cicely.de> In-Reply-To: <20030721130013.GI19386@cicely12.cicely.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200307220004.21883.Danovitsch@Vitsch.net> cc: FreeBSD-Hackers@FreeBSD.org Subject: Re: differences in USB support between FreeBSD 4.x and 5.x ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 22:02:41 -0000 On Monday 21 July 2003 15:00, Bernd Walter wrote: > On Mon, Jul 21, 2003 at 09:18:42AM +0200, Marco Molteni wrote: > > [I sent the same message to usb-bsd@eleetbsd.org, but since that list > > seems not very active, I am asking here too] > > > > Hi all, > > > > the subject says it all. > > > > I am considering using FreeBSD for a robotics project, and I am > > thinking of using 4.x for stability. But, since we will probably use > > USB a lot, I am wondering if maybe 5.x is a better choice. > > I believe 4.x has all you need for your project. > If you really find a problem then the missing part can be MFC'ed. Both 4.x and 5.x have a pointer-bug in the ugen-driver causing memory to = be=20 overwritten outside a buffer when using isochronous transfers. I have sen= t a=20 PR about this (with patch) back in April. **(: HINT HINT :) ** ( pr kern/51186 : http://www.FreeBSD.org/cgi/query-pr.cgi?pr=3Dkern%2F511= 86 ) thanks, Daan From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 15:46:38 2003 Return-Path: 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 1B01837B401 for ; Mon, 21 Jul 2003 15:46:38 -0700 (PDT) Received: from gta.com (mailgate.gta.com [199.120.225.4]) by mx1.FreeBSD.org (Postfix) with SMTP id 5C5B443FA3 for ; Mon, 21 Jul 2003 15:46:37 -0700 (PDT) (envelope-from lab@gta.com) Received: (qmail 39456 invoked by uid 1000); 21 Jul 2003 22:46:36 -0000 Date: 21 Jul 2003 22:46:36 -0000 Message-ID: <20030721224636.39455.qmail@gta.com> From: Larry Baird To: hackers@freebsd.org In-Reply-To: <20030721175214.16861.qmail@gta.com> User-Agent: tin/1.5.9-20010723 ("Chord of Souls") (UNIX) (FreeBSD/4.5-RELEASE-p3 (i386)) Subject: Re: differences in USB support between FreeBSD 4.x and 5.x ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 22:46:38 -0000 > 5.x seems to have much better support for USB 2.0 as well. I have > a SanDisk 2.0 USB compact flash reader that just works with 5.1 release. > So far no amount of kernel hacking has made it work with 4.8. > Unfortunetly for me I need it to work under 4.8. )-: As a follow up to this problem report. The problem turned out to be the USB hub I was using on my 4.8 box. I would have sworn I tested without the hub last week when I first had problems. But alas I must have dreamed I made this test. All is well under 5.1 and 4.8 with my SanDisk USB 2.0 compact flash reader. (-: Larry -- ------------------------------------------------------------------------ Larry Baird | http://www.gta.com Global Technology Associates, Inc. | Orlando, FL Email: lab@gta.com | TEL 407-380-0220, FAX 407-380-6080 From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 15:47:20 2003 Return-Path: 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 E477A37B404 for ; Mon, 21 Jul 2003 15:47:19 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8381343FBF for ; Mon, 21 Jul 2003 15:47:18 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id B75F63ABB51; Tue, 22 Jul 2003 00:47:36 +0200 (CEST) Date: Tue, 22 Jul 2003 00:47:36 +0200 From: Pawel Jakub Dawidek To: Bruce M Simpson , Matthew Dillon , freebsd-hackers@freebsd.org Message-ID: <20030721224736.GE43543@garage.freebsd.pl> References: <20030720235759.GJ437@garage.freebsd.pl> <20030721181805.GA43543@garage.freebsd.pl> <200307211903.h6LJ3xrX027536@apollo.backplane.com> <20030721191622.GC43543@garage.freebsd.pl> <20030721195119.GG22295@spc.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="nHwqXXcoX0o6fKCv" Content-Disposition: inline In-Reply-To: <20030721195119.GG22295@spc.org> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.8-RELEASE i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i Subject: Re: VM problem... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 22:47:20 -0000 --nHwqXXcoX0o6fKCv Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 21, 2003 at 08:51:19PM +0100, Bruce M Simpson wrote: Matt, Bruce, thanks! I've track it down. Yes, those read-only pages was reused. So now I'm putting them on list before syscall is called, and after syscall is executed I free memory for non-execve syscalls and mark entries from list as VM_PROT_ALL for execve(). I'll play in the future with vm_map_delete() maybe those pages are removable in safe way. But why memory allocator, that is responsible for finding pages for stack don't check their permissions? --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --nHwqXXcoX0o6fKCv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPxxtiD/PhmMH/Mf1AQFiJwP7Bbr2k8J4pZu8jpd2+pIOfrRICKV3FmhU gh6Goo0q6iLItIddp3vtdHZhTI0bDdZXf1hI4KDLWobWYvpSWS6doISoMd7njlKz Le5GWjQCCsEgHYas68q6s9mntN6A8hyIZY5qqAL5fVClpfdTzuJcTRgBVyGyHeM8 b5pEcNwtY0s= =XdRc -----END PGP SIGNATURE----- --nHwqXXcoX0o6fKCv-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 20:30:40 2003 Return-Path: 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 23ED037B405 for ; Mon, 21 Jul 2003 20:30:40 -0700 (PDT) Received: from shiva.warpcore.org (shiva.warpcore.org [208.2.70.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85A2F43F85 for ; Mon, 21 Jul 2003 20:30:39 -0700 (PDT) (envelope-from drevil@warpcore.org) Received: from [65.26.140.154] (CPE-65-26-140-154.kc.rr.com [65.26.140.154]) by shiva.warpcore.org (8.12.9/8.12.9) with ESMTP id h6M3Ucdv011851 for ; Mon, 21 Jul 2003 22:30:38 -0500 From: Shawn To: freebsd-hackers@freebsd.org Content-Type: text/plain Organization: http://drevil.warpcore.org/ Message-Id: <1058844639.2136.22.camel@CPE-65-26-140-154.kc.rr.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 21 Jul 2003 22:30:39 -0500 Content-Transfer-Encoding: 7bit Subject: Where / how to begin the FreeBSD development journey? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 03:30:40 -0000 I've recently setup and started using Free-BSD 5.1 as my desktop at home and was looking to find more information about getting started in contributing to the Free-BSD project. What piqued my interest is the well organised clean Free-BSD kernel, and the vast wealth of documentation on using the system. Also, the general attitude of the Free-BSD community seems to be far more mature than that of many other operating systems projects that seem to be appearing all over lately. While I am no master of the trade so to speak, I have seen lots of code over the last 10 years or so, and reading the Free-BSD kernel code is quite pleasant and enjoyable in comparison. The responsiveness and stability of Free-BSD 5.1 on my system have convinced me enough that I've switched my personal development desktop and email to Free-BSD 5.1, it really is that wonderful. Now before anyone floats away from all the hot air I've blown, I was wondering if there were any other recommended pieces of reading material that might be helpful in better understanding Free-BSD's architecture and design. I am aware of Tannenbaum's books, and I also own a few Linux Kernel books as well. As well, I have read through most of the documentation already (certainly all that was available in the installer), and did not find any specific mentions of how one should begin to familiarise themselves with FreeBSD's internals and so forth. I did however find some recommendations to read 'The Design and Implementation of the 4.4 BSD Operating System', which I recently obtained and have begun. I did peruse the bugs list at the FreeBSD web site curious as to what the current outstanding issue list was, and felt compelled to see if there was anything left open that I might put my hand to and felt a bit overwhelmed. I noticed that there are over 2,000 some entries with some dating as far back as 1996. So, I wasn't exactly sure where one would begin there either. An acquaintance of mine had suggested that I should involve myself with the newly founded DragonFly BSD project. But, I felt that I would rather start here first. So where or how does one begin the journey? -- Shawn http://drevil.warpcore.org/ From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 20:46:10 2003 Return-Path: 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 CCBC337B401 for ; Mon, 21 Jul 2003 20:46:10 -0700 (PDT) Received: from lakemtao07.cox.net (lakemtao07.cox.net [68.1.17.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id DDAAB43F75 for ; Mon, 21 Jul 2003 20:46:09 -0700 (PDT) (envelope-from mezz7@cox.net) Received: from mezz.mezzweb.com ([68.103.32.11]) by lakemtao07.cox.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP id <20030722034608.WPLP26675.lakemtao07.cox.net@mezz.mezzweb.com>; Mon, 21 Jul 2003 23:46:08 -0400 Date: Mon, 21 Jul 2003 22:46:16 -0500 To: Shawn Content-Type: text/plain; charset=utf-8; format=flowed References: <1058844639.2136.22.camel@CPE-65-26-140-154.kc.rr.com> From: Jeremy Messenger MIME-Version: 1.0 Message-ID: In-Reply-To: <1058844639.2136.22.camel@CPE-65-26-140-154.kc.rr.com> User-Agent: Opera7.11/Linux M2 build 406 cc: freebsd-hackers@freebsd.org Subject: Re: Where / how to begin the FreeBSD development journey? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 03:46:11 -0000 On 21 Jul 2003 22:30:39 -0500, Shawn wrote: > I've recently setup and started using Free-BSD 5.1 as my desktop at home > and was looking to find more information about getting started in > contributing to the Free-BSD project. > > What piqued my interest is the well organised clean Free-BSD kernel, and > the vast wealth of documentation on using the system. Also, the general > attitude of the Free-BSD community seems to be far more mature than that > of many other operating systems projects that seem to be appearing all > over lately. While I am no master of the trade so to speak, I have seen > lots of code over the last 10 years or so, and reading the Free-BSD > kernel code is quite pleasant and enjoyable in comparison. > > The responsiveness and stability of Free-BSD 5.1 on my system have > convinced me enough that I've switched my personal development desktop > and email to Free-BSD 5.1, it really is that wonderful. > > Now before anyone floats away from all the hot air I've blown, I was > wondering if there were any other recommended pieces of reading material > that might be helpful in better understanding Free-BSD's architecture > and design. I am aware of Tannenbaum's books, and I also own a few Linux > Kernel books as well. > > As well, I have read through most of the documentation already > (certainly all that was available in the installer), and did not find > any specific mentions of how one should begin to familiarise themselves > with FreeBSD's internals and so forth. I did however find some > recommendations to read 'The Design and Implementation of the 4.4 BSD > Operating System', which I recently obtained and have begun. > > I did peruse the bugs list at the FreeBSD web site curious as to what > the current outstanding issue list was, and felt compelled to see if > there was anything left open that I might put my hand to and felt a bit > overwhelmed. I noticed that there are over 2,000 some entries with some > dating as far back as 1996. So, I wasn't exactly sure where one would > begin there either. > > An acquaintance of mine had suggested that I should involve myself with > the newly founded DragonFly BSD project. But, I felt that I would rather > start here first. > > So where or how does one begin the journey? Is this http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers- handbook/ what you are looking for? Also, you can try to check http://www.freebsd.org/docs.html .. Cheers, Mezz -- bsdforums.org 's moderator, mezz. From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 21:35:32 2003 Return-Path: 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 14D5A37B401 for ; Mon, 21 Jul 2003 21:35:32 -0700 (PDT) Received: from shiva.warpcore.org (shiva.warpcore.org [208.2.70.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BD7143FAF for ; Mon, 21 Jul 2003 21:35:31 -0700 (PDT) (envelope-from drevil@warpcore.org) Received: from [65.26.140.154] (CPE-65-26-140-154.kc.rr.com [65.26.140.154]) by shiva.warpcore.org (8.12.9/8.12.9) with ESMTP id h6M4ZUdv019098 for ; Mon, 21 Jul 2003 23:35:30 -0500 From: Shawn To: freebsd-hackers@freebsd.org In-Reply-To: References: <1058844639.2136.22.camel@CPE-65-26-140-154.kc.rr.com> Content-Type: text/plain Organization: http://drevil.warpcore.org/ Message-Id: <1058848530.1647.0.camel@CPE-65-26-140-154.kc.rr.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 21 Jul 2003 23:35:31 -0500 Content-Transfer-Encoding: 7bit Subject: Re: Where / how to begin the FreeBSD development journey? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 04:35:32 -0000 On Mon, 2003-07-21 at 22:46, Jeremy Messenger wrote: > Is this http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers- > handbook/ what you are looking for? Also, you can try to check > http://www.freebsd.org/docs.html .. Thank you! I can't believe I missed that. I swear I looked all around the site, even in the section you mention. I read all of the normal handbook, but hadn't spotted that one. Again, I thank you! -- Shawn http://drevil.warpcore.org/ From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 23:01:24 2003 Return-Path: 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 3FBBB37B412 for ; Mon, 21 Jul 2003 23:01:24 -0700 (PDT) Received: from burka.carrier.kiev.ua (burka.carrier.kiev.ua [193.193.193.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5315043F3F for ; Mon, 21 Jul 2003 23:01:22 -0700 (PDT) (envelope-from netch@lucky.net) Received: from netch@localhost [127.0.0.1] (netch@localhost [127.0.0.1]) by burka.carrier.kiev.ua with ESMTP id h6M61APX041290; Tue, 22 Jul 2003 09:01:10 +0300 (EEST) (envelope-from netch@burka.carrier.kiev.ua) Received: (from netch@localhost) by burka.carrier.kiev.ua (8.12.8p1/8.12.8/Submit) id h6M616a9041275; Tue, 22 Jul 2003 09:01:06 +0300 (EEST) (envelope-from netch) Date: Tue, 22 Jul 2003 09:01:06 +0300 From: Valentin Nechayev To: Dag-Erling Sm?rgrav Message-ID: <20030722060106.GE76126@lucky.net> References: <20030718091248.GO76126@lucky.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-42: On X-Verify-Sender: verified cc: hackers@freebsd.org Subject: Re: complicated downgrade X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: netch@lucky.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 06:01:24 -0000 Mon, Jul 21, 2003 at 23:40:05, des wrote about "Re: complicated downgrade": >> I need to downgrade a remote FreeBSD system from 5.1-release to 4.8-release >> remotely without any local help (except possible hitting Reset). > Maybe if you tell us why you need to do this we can figure out a way > for you to avoid doing it? System periodically hangs up. Average uptime is ~6 hours. No crash info is available. No serial console is available. Different invariants didn't help, AFAIK (this testing was done by another admin, so I'm not 100% sure). 4.8 in any case is considered more stable, so switching can exclude some software problems or software-caused triggerings of hardware problems. Just now question isn't so important because it was decided to move to another box (including more friendly environment), so my question is more theoretical than practical. But, there is opportunity to play with configs, so I'll try again to play with invariants, witnesses, etc. Thanks to all for help. -netch- From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 00:05:25 2003 Return-Path: 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 BA80537B401 for ; Tue, 22 Jul 2003 00:05:25 -0700 (PDT) Received: from puffin.mail.pas.earthlink.net (puffin.mail.pas.earthlink.net [207.217.120.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34EF443FAF for ; Tue, 22 Jul 2003 00:05:25 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfi7s.dialup.mindspring.com ([165.247.200.252] helo=mindspring.com) by puffin.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19erD5-0004Ck-00; Tue, 22 Jul 2003 00:05:20 -0700 Message-ID: <3F1CE1EA.9A9E5657@mindspring.com> Date: Tue, 22 Jul 2003 00:04:10 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Shawn References: <1058844639.2136.22.camel@CPE-65-26-140-154.kc.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a43f13319bda07af38e5f9cb97842054d93ca473d225a0f487350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org Subject: Re: Where / how to begin the FreeBSD development journey? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 07:05:26 -0000 Shawn wrote: > I did peruse the bugs list at the FreeBSD web site curious as to what > the current outstanding issue list was, and felt compelled to see if > there was anything left open that I might put my hand to and felt a bit > overwhelmed. I noticed that there are over 2,000 some entries with some > dating as far back as 1996. So, I wasn't exactly sure where one would > begin there either. There's a wide range of options, from the expensive to the free online stuff. At the high end, we have: $1300 https://www.mckusick.com/courses/introorderform.html $1500 https://www.mckusick.com/courses/advorderform.html At the low end, we have things like: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/index.html http://www.vsi.ru/library/Programmer/fbsdkern/ You could also look at the "Blue Prints" column at the web site http://www.daemonnews.org/ There is also a "new users" section there: http://www.daemonnews.org/new2bsd/ And there is always the mailing list archives: http://docs.freebsd.org/mail/ -- Terry From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 03:43:03 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 618) id 1FE5537B413; Tue, 22 Jul 2003 03:43:03 -0700 (PDT) To: freebsd-net@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG, freebsd-hardwre@FreeBSD.ORG, freebsd-chat@FreeBSD.ORG Date: Tue, 22 Jul 2003 03:43:03 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20030722104303.1FE5537B413@hub.freebsd.org> From: wpaul@FreeBSD.ORG (Bill Paul) Subject: nVidia nForce2 potential owners please read X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 10:43:03 -0000 From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 04:35:48 2003 Return-Path: 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 33E6337B401 for ; Tue, 22 Jul 2003 04:35:48 -0700 (PDT) Received: from genius.tao.org.uk (genius.tao.org.uk [212.135.162.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEB9943FBD for ; Tue, 22 Jul 2003 04:35:46 -0700 (PDT) (envelope-from joe@genius.tao.org.uk) Received: by genius.tao.org.uk (Postfix, from userid 100) id 207EC42A6; Tue, 22 Jul 2003 12:35:27 +0100 (BST) Date: Tue, 22 Jul 2003 12:35:27 +0100 From: Josef Karthauser To: Larry Baird Message-ID: <20030722113527.GF78496@genius.tao.org.uk> References: <20030721175214.16861.qmail@gta.com> <20030721224636.39455.qmail@gta.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030721224636.39455.qmail@gta.com> User-Agent: Mutt/1.5.4i cc: hackers@freebsd.org Subject: Re: differences in USB support between FreeBSD 4.x and 5.x ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 11:35:48 -0000 On Mon, Jul 21, 2003 at 10:46:36PM -0000, Larry Baird wrote: > > 5.x seems to have much better support for USB 2.0 as well. I have > > a SanDisk 2.0 USB compact flash reader that just works with 5.1 release. > > So far no amount of kernel hacking has made it work with 4.8. > > Unfortunetly for me I need it to work under 4.8. )-: > As a follow up to this problem report. The problem turned out to be > the USB hub I was using on my 4.8 box. I would have sworn I tested > without the hub last week when I first had problems. But alas I must > have dreamed I made this test. All is well under 5.1 and 4.8 with my > SanDisk USB 2.0 compact flash reader. (-: > I wish that all usb problems that that easy to solve! :) Joe -- Josef Karthauser (joe@tao.org.uk) http://www.josef-k.net/ FreeBSD (cvs meister, admin and hacker) http://www.uk.FreeBSD.org/ Physics Particle Theory (student) http://www.pact.cpes.sussex.ac.uk/ ================ An eclectic mix of fact and theory. ================= From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 04:54:39 2003 Return-Path: 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 A80AA37B401 for ; Tue, 22 Jul 2003 04:54:39 -0700 (PDT) Received: from hexagon.stack.nl (hexagon.stack.nl [131.155.140.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id A194543F85 for ; Tue, 22 Jul 2003 04:54:38 -0700 (PDT) (envelope-from marcolz@stack.nl) Received: by hexagon.stack.nl (Postfix, from userid 65534) id 23D2E1C38; Tue, 22 Jul 2003 13:54:37 +0200 (CEST) Received: from turtle.stack.nl (turtle.stack.nl [2001:610:1108:5010:2e0:81ff:fe22:51d8]) by hexagon.stack.nl (Postfix) with ESMTP id 945BA1C0F; Tue, 22 Jul 2003 13:54:32 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 333) id 85CA81CC56; Tue, 22 Jul 2003 13:54:32 +0200 (CEST) Date: Tue, 22 Jul 2003 13:54:32 +0200 From: Marc Olzheim To: Tim Kientzle Message-ID: <20030722115432.GA36870@stack.nl> References: <3F1B0610.90803@acm.org> <20030720225041.GA26277@ussenterprise.ufp.org> <3F1C0C91.6050203@acm.org> <20030721165735.GA56766@ussenterprise.ufp.org> <20030721171538.GA21656@colnta.acns.ab.ca> <20030721172321.GA57666@ussenterprise.ufp.org> <20030721174206.GA21892@colnta.acns.ab.ca> <3F1C2FEB.4070801@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F1C2FEB.4070801@acm.org> X-Operating-System: FreeBSD turtle.stack.nl 5.1-BETA FreeBSD 5.1-BETA X-URL: http://www.stack.nl/~marcolz/ User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-5.0 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MUTT version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: hackers@freebsd.org cc: Chad David Subject: Re: Correct way to call execve? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 11:54:39 -0000 On Mon, Jul 21, 2003 at 11:24:43AM -0700, Tim Kientzle wrote: > Chad David wrote: > >I assumed it was obvious that you could copy the data, but I believe > >the intent of the original question was to find an alternative. As > >far as I know there isn't one. A const is a const, except in C++. > > Yes, the intent was to find a way to avoid copying the data. > > I was hoping that someone knew a standard way to > say "yes, I really do mean to cast away that const," > akin to C++ const_cast. > > As far as I can tell, the POSIX-mandated declaration > of execvp is simply wrong. (SUSv3 even has a comment > that essentially admits this fact and then vainly tries > to rationalize it. ) I mailed this a long time ago: char * func(void) { char *foo; const char *cfoo = "bar"; /* From http://www.eskimo.com/~scs/C-faq/q11.10.html: * * References: ANSI Sec. 3.1.2.6, Sec. 3.3.16.1, Sec. 3.5.3 * ISO Sec. 6.1.2.6, Sec. 6.3.16.1, Sec. 6.5.3 * H&S Sec. 7.9.1 pp. 221-2 * * Use -Wcast-qual with gcc. * gcc 2.7.2.3 ok, gcc 2.95.2 not ok. */ foo = *((char *const *) &cfoo); return (foo); } But that doesn't work after 2.7.2 What does work, except with 2.95 is this: foo = *((char **)((void *)&cfoo))); Then again: you can always use the union trick: union { void *nonconst; const void *constant; } hack; hack.constant = cfoo; foo = hack.nonconst; Zlo From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 05:37:01 2003 Return-Path: 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 B6BA737B401 for ; Tue, 22 Jul 2003 05:37:01 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27A9643F3F for ; Tue, 22 Jul 2003 05:37:00 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.9/8.12.9) with ESMTP id h6MCarhR038361 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 22 Jul 2003 14:36:56 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.9/8.12.9) with ESMTP id h6MCaqAx066975 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 Jul 2003 14:36:52 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.9/8.12.9) with ESMTP id h6MCaqYV004909; Tue, 22 Jul 2003 14:36:52 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.9/8.12.9/Submit) id h6MCaotC004890; Tue, 22 Jul 2003 14:36:50 +0200 (CEST) Date: Tue, 22 Jul 2003 14:36:50 +0200 From: Bernd Walter To: "Daan Vreeken [PA4DAN]" Message-ID: <20030722123649.GM511@cicely12.cicely.de> References: <20030721071842.GC58121@cobweb.example.org> <20030721130013.GI19386@cicely12.cicely.de> <200307220004.21883.Danovitsch@Vitsch.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200307220004.21883.Danovitsch@Vitsch.net> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: FreeBSD-Hackers@freebsd.org cc: ticso@cicely.de Subject: Re: differences in USB support between FreeBSD 4.x and 5.x ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 12:37:02 -0000 On Tue, Jul 22, 2003 at 12:04:21AM +0200, Daan Vreeken [PA4DAN] wrote: > On Monday 21 July 2003 15:00, Bernd Walter wrote: > > On Mon, Jul 21, 2003 at 09:18:42AM +0200, Marco Molteni wrote: > > > [I sent the same message to usb-bsd@eleetbsd.org, but since that list > > > seems not very active, I am asking here too] > > > > > > Hi all, > > > > > > the subject says it all. > > > > > > I am considering using FreeBSD for a robotics project, and I am > > > thinking of using 4.x for stability. But, since we will probably use > > > USB a lot, I am wondering if maybe 5.x is a better choice. > > > > I believe 4.x has all you need for your project. > > If you really find a problem then the missing part can be MFC'ed. > Both 4.x and 5.x have a pointer-bug in the ugen-driver causing memory to be > overwritten outside a buffer when using isochronous transfers. I have sent a > PR about this (with patch) back in April. > **(: HINT HINT :) ** > ( pr kern/51186 : http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern%2F51186 ) I'll take a look at this. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 06:16:31 2003 Return-Path: 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 913E437B407 for ; Tue, 22 Jul 2003 06:16:31 -0700 (PDT) Received: from godel.mtl.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16C8A43FB1 for ; Tue, 22 Jul 2003 06:16:30 -0700 (PDT) (envelope-from bmilekic@technokratis.com) Received: from godel.mtl.distributel.net (localhost [127.0.0.1]) h6M9KUEH058233; Tue, 22 Jul 2003 09:20:30 GMT (envelope-from bmilekic@technokratis.com) Received: (from bmilekic@localhost) by godel.mtl.distributel.net (8.12.9/8.12.9/Submit) id h6M9KURs058232; Tue, 22 Jul 2003 09:20:30 GMT X-Authentication-Warning: godel.mtl.distributel.net: bmilekic set sender to bmilekic@technokratis.com using -f Date: Tue, 22 Jul 2003 09:20:30 +0000 From: Bosko Milekic To: Valentin Nechayev Message-ID: <20030722092030.GB58118@technokratis.com> References: <20030718091248.GO76126@lucky.net> <20030722060106.GE76126@lucky.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030722060106.GE76126@lucky.net> User-Agent: Mutt/1.4.1i cc: Dag-Erling Sm?rgrav cc: hackers@freebsd.org Subject: Re: complicated downgrade X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 13:16:32 -0000 On Tue, Jul 22, 2003 at 09:01:06AM +0300, Valentin Nechayev wrote: > Mon, Jul 21, 2003 at 23:40:05, des wrote about "Re: complicated downgrade": > > >> I need to downgrade a remote FreeBSD system from 5.1-release to 4.8-release > >> remotely without any local help (except possible hitting Reset). > > Maybe if you tell us why you need to do this we can figure out a way > > for you to avoid doing it? > > System periodically hangs up. Average uptime is ~6 hours. No crash info > is available. No serial console is available. Different invariants didn't > help, AFAIK (this testing was done by another admin, so I'm not 100% sure). > 4.8 in any case is considered more stable, so switching can exclude > some software problems or software-caused triggerings of hardware problems. This sounds like the same symptoms as the latest USB problem... when/if you track -current or even run one of the 5.x releases, it's key to realize that this is very active code that you're running; it's not the same thing as running 4.x, for example. The code in 5.x is constantly actively changing, whereas the code in 4.x only receives comparatively well-regulated merges from 5.x, for the most part. Therefore, one of the things to always try is to update to the latest -current, rebuild, and see if you can reproduce. Chances are, your problem may have been fixed and, if not, at least we can be confident that it's reproducable on your hardware with the latest sources. > Just now question isn't so important because it was decided to move to another > box (including more friendly environment), so my question is more theoretical > than practical. But, there is opportunity to play with configs, so I'll try > again to play with invariants, witnesses, etc. > > Thanks to all for help. > > > -netch- Cheers, -- Bosko Milekic * bmilekic@technokratis.com * bmilekic@FreeBSD.org TECHNOkRATIS Consulting Services * http://www.technokratis.com/ From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 07:15:57 2003 Return-Path: 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 C609C37B401 for ; Tue, 22 Jul 2003 07:15:57 -0700 (PDT) Received: from genius.tao.org.uk (genius.tao.org.uk [212.135.162.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11FB643F75 for ; Tue, 22 Jul 2003 07:15:57 -0700 (PDT) (envelope-from joe@genius.tao.org.uk) Received: by genius.tao.org.uk (Postfix, from userid 100) id 9E51B47A0; Tue, 22 Jul 2003 15:15:38 +0100 (BST) Date: Tue, 22 Jul 2003 15:15:38 +0100 From: Josef Karthauser To: ticso@cicely.de Message-ID: <20030722141538.GA80873@genius.tao.org.uk> Mail-Followup-To: Josef Karthauser , ticso@cicely.de, "Daan Vreeken [PA4DAN]" , FreeBSD-Hackers@freebsd.org References: <20030721071842.GC58121@cobweb.example.org> <20030721130013.GI19386@cicely12.cicely.de> <200307220004.21883.Danovitsch@Vitsch.net> <20030722123649.GM511@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030722123649.GM511@cicely12.cicely.de> User-Agent: Mutt/1.5.4i cc: "Daan Vreeken \[PA4DAN\]" cc: FreeBSD-Hackers@freebsd.org Subject: Re: differences in USB support between FreeBSD 4.x and 5.x ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 14:15:58 -0000 On Tue, Jul 22, 2003 at 02:36:50PM +0200, Bernd Walter wrote: > > PR about this (with patch) back in April. > > **(: HINT HINT :) ** > > ( pr kern/51186 : http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern%2F51186 ) > > I'll take a look at this. > Thanks Bernd, Joe -- Josef Karthauser (joe@tao.org.uk) http://www.josef-k.net/ FreeBSD (cvs meister, admin and hacker) http://www.uk.FreeBSD.org/ Physics Particle Theory (student) http://www.pact.cpes.sussex.ac.uk/ ================ An eclectic mix of fact and theory. ================= From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 08:29:51 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 618) id 2F96537B401; Tue, 22 Jul 2003 08:29:51 -0700 (PDT) To: freebsd-hackers@FreeBSD.ORG, freebsd-net@FreeBSD.ORG, freebsd-chat@FreeBSD.ORG Date: Tue, 22 Jul 2003 08:29:51 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20030722152951.2F96537B401@hub.freebsd.org> From: wpaul@FreeBSD.ORG (Bill Paul) Subject: nVidia nForce2 potential owners please read (take two) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 15:29:51 -0000 This only made it to one list the first time, trying again. These newfangled computer things clearly can't be trusted. ------------------------------------------------------------------------- Ok, so, it occured to me recently to try to convince nVidia to cough up programming documentation for their MCP ethernet controller. However, in order to do that, I need to be able to show that there is in fact sufficient demand for a FreeBSD (or even NetBSD or OpenBSD) driver to make it worth their while. nVidia doesn't listen to end users, only OEMs, and if the OEMs don't ask for support for a given OS, then support will not materialize. My goal is to convince them to pull their heads far enough out from between their legs to realize that Linux is not the be-all, end-all of open source, and that just because OEMs haven't mentioned FreeBSD, NetBSD or OpenBSD by name doesn't mean there aren't people who want MCP ethernet support in BSD. For this, I need your help. What I need is to gather proof of demand. What I want you do to is e-mail me (oh god, I can't believe I'm setting myself up for this) if: - You wanted to purchase a computer system with an nVidia nForce2 chipset but _didn't_ once you realized there was no BSD driver support for the on-board ethernet. - You bought an nVidia nForce2 system without realizing the on-board ethernet wasn't supported in BSD, were really disappointed once you found out, and complained to the manufacturer _OR_ you wanted to complain but didn't (because you weren't sure who to complain to, or you didn't get around to it yet, or you forgot, or you were abducted by aliens, or your dog ate your homework, or whatever). - You are in a position to approve or recommend the purchase of a computer system (or several systems) for your company, research group, espionage organization or other institution with money to spend, but won't because there's no BSD driver support for the on-board ethernet. - You never heard of nVidia, the nForce2 or the MCP ethernet controller until I mentioned them, but now that you have, and you've gone out and searched the interweb or visited your local computer store, you think they're all really spiffy and would happily buy an nForce2 system, but will hold off until there's a BSD driver for the on-board ethernet. - You want to give me free large bags of cash. Do *NOT* e-mail me if: - You want me to help you transfer a large sum of money out of Nigeria or some other African nation. - You think I'm dying of cancer and my dying wish is to collect e-mails from all over the world. - You think I want to MAKE MONEY FAST (if I wanted to do that, I wouldn't be writing device drivers for free). - You work for SCO or the RIAA. I think you get the idea. Consider it a petition of sorts. All I need is an e-mail from you, with a line or two explaining your particular circumstances. If you did not buy an nForce2-based computer due to lack of BSD support, say so. If you did, but you were pissed by the lack of BSD support, say so. If you told your friends, relatives, cow-orkers or purchasing office not to buy nForce2-based computers because of the lack of BSD support, say so. Cite the OEM vendor of the computer (or computer) and the model (or models) where appropriate. If more than one computer was involved, say how many. Every lost sale or dissatisfied customer I can present as evidence makes it that much easier to convince nVidia to unclench its tight... fists... and provide the documentation needed to write a BSD driver. NOTE: Please do make up phony e-mails just to bloat the figures or or cobble together a perl script to send me hundreds of auto-generated messages from forged addresses. Play nice, you scum. So, send your cards and letters to wpaul@freebsd.org. And don't be afraid to spread the word. Ask other people on other mailing lists. Ask your friends. Ask your enemies. Ask not what your OS can do for you: ask what you can do for your OS. -Bill -- ============================================================================= -Bill Paul (510) 749-2329 | Senior Engineer, Master of Unix-Fu wpaul@windriver.com | Wind River Systems ============================================================================= "If stupidity were a handicap, you'd have the best parking spot." ============================================================================= From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 08:38:09 2003 Return-Path: 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 5571937B401 for ; Tue, 22 Jul 2003 08:38:09 -0700 (PDT) Received: from burka.carrier.kiev.ua (burka.carrier.kiev.ua [193.193.193.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DCBA43FA3 for ; Tue, 22 Jul 2003 08:38:07 -0700 (PDT) (envelope-from netch@lucky.net) Received: from netch@localhost [127.0.0.1] (netch@localhost [127.0.0.1]) by burka.carrier.kiev.ua with ESMTP id h6MFbsPX050662; Tue, 22 Jul 2003 18:37:56 +0300 (EEST) (envelope-from netch@burka.carrier.kiev.ua) Received: (from netch@localhost) by burka.carrier.kiev.ua (8.12.8p1/8.12.8/Submit) id h6MFbswo050659; Tue, 22 Jul 2003 18:37:54 +0300 (EEST) (envelope-from netch) Date: Tue, 22 Jul 2003 18:37:54 +0300 From: Valentin Nechayev To: Bosko Milekic Message-ID: <20030722153754.GM76126@lucky.net> References: <20030718091248.GO76126@lucky.net> <20030722060106.GE76126@lucky.net> <20030722092030.GB58118@technokratis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030722092030.GB58118@technokratis.com> X-42: On X-Verify-Sender: verified cc: Dag-Erling Sm?rgrav cc: hackers@freebsd.org Subject: Re: complicated downgrade X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: netch@lucky.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 15:38:09 -0000 Tue, Jul 22, 2003 at 09:20:30, bmilekic wrote about "Re: complicated downgrade": > This sounds like the same symptoms as the latest USB problem... > when/if you track -current or even run one of the 5.x releases, it's > key to realize that this is very active code that you're running; it's > not the same thing as running 4.x, for example. The code in 5.x is > constantly actively changing, whereas the code in 4.x only receives > comparatively well-regulated merges from 5.x, for the most part. > Therefore, one of the things to always try is to update to the latest > -current, rebuild, and see if you can reproduce. Chances are, your > problem may have been fixed and, if not, at least we can be confident > that it's reproducable on your hardware with the latest sources. Well, I can do such mad rides on home machine, but not on remote collocation in another country. Running fresh -current I can get a bunch of some other problems which effectively will prevent system from running ;( The most problem I see preventing having much more wide testbase for -current is continuous nature of its committing. If it were developed, e.g., on week pulse, with only fixing bugs since Thu till Mon, and providing semi-stable snapshot on Mon, it can be more attractive to many users which want to track -current but have no will to deal with permanent panics... (Pulse iteration length can be arbitrary. One week is one averagely reasonable value. 3 months, as in RELENG_4, is too long.) -netch- From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 10:43:37 2003 Return-Path: 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 EB6BC37B401; Tue, 22 Jul 2003 10:43:36 -0700 (PDT) Received: from garple.migus.org (pcp243383pcs.howard01.md.comcast.net [68.55.83.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8EF243F93; Tue, 22 Jul 2003 10:43:33 -0700 (PDT) (envelope-from adam@migus.org) Received: from garple.migus.org (localhost [127.0.0.1]) by garple.migus.org (8.12.9/8.12.9) with ESMTP id h6MHhW6a023583; Tue, 22 Jul 2003 13:43:32 -0400 (EDT) (envelope-from adam@migus.org) Received: (from www@localhost) by garple.migus.org (8.12.9/8.12.9/Submit) id h6MHhVf9023582; Tue, 22 Jul 2003 13:43:31 -0400 (EDT) X-Authentication-Warning: garple.migus.org: www set sender to adam@migus.org using -f Received: from 204.254.155.100 (SquirrelMail authenticated user adam) by mail.migus.org with HTTP; Tue, 22 Jul 2003 13:43:31 -0400 (EDT) Message-ID: <63051.204.254.155.100.1058895811.squirrel@mail.migus.org> In-Reply-To: References: <20030721190146.GB43543@garage.freebsd.pl> Date: Tue, 22 Jul 2003 13:43:31 -0400 (EDT) From: "Adam Migus" To: "Robert Watson" User-Agent: SquirrelMail/1.4.1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Spam-Status: No, hits=-1.9 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,PRIORITY_NO_NAME,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT,X_AUTH_WARNING version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-hackers@freebsd.org Subject: Re: Communications kernel -> userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 17:43:37 -0000 Robert Watson said: > > On Mon, 21 Jul 2003, Pawel Jakub Dawidek wrote: > >> For example syscall is marking some range with mark() >> function. For now >> on this range isn't accessable from userland. If >> process will try to >> write to this page, page is copied (copy-on-write). >> If this page will >> be modified by kernel it will be marked as MODIFIED. >> Now when syscall >> will call unmark() on this range we could get two >> scenarious: >> >> 1. Page is marked as MODIFIED (by kernel) so >> userland copy >> of this page (if it exists of course) is >> destroyed and >> this page will be putted in its place. >> This is replacement for copyin() and then >> copyout() or >> just copyout().. >> 2. Page isn't marked as MODIFIED, so kernel version >> of page >> is destroyed (is there is userland version). >> This is replacement for just copyin(). >> >> There could be other ways. Thread/process could be >> locked if it is >> trying to access memory marked with mark() function. >> And this, I think, >> don't hit performance, because this happends really >> rarely. So maybe it >> is better to lock thread for a moment instead of >> doplicating page, but I >> don't think so. > > This sounds a bit like some of the IO Lite stuff -- > moving to a > page-centric model for IO interfaces to avoid copy > operations, in many > cases able to share pages between applications, buffer > cache, network > buffers, etc. Take a look at: > > http://www.cs.princeton.edu/~vivek/ > > For some details. Some of the benefits of this > approach are captured in > the common case through sendfile(), in practice, but > it's definitely worth > a read. > > I guess what I had in mind was something more > network-specific, with > interfaces optimized for memory mapped network packet > streams. In the > simplest case, something like memory-mapping the BPF > buffer from kernel > space to userspace, with some sort of simple stream > synchronization so > that the user application could notify the kernel as to > when it could > reuse bits of the buffer, but avoiding copy operations > and lots of context > switching. > > Robert N M Watson FreeBSD Core Team, > TrustedBSD Projects > robert@fledge.watson.org Network Associates > Laboratories > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" > Perhaps I'm not understanding you right but I think Pawel's idea is cool. It seems to fulfill your requirements (except being network specific). I suppose if it were network specific we could optimize it for packet streams and if we made it complicated enough it would require quite an elaborate sychronization and notification mechanism. Is that closer to what have in mind? -- Adam Migus - Research Scientist Network Associates Laboratories (http://www.nailabs.com) From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 11:05:16 2003 Return-Path: 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 4979A37B401 for ; Tue, 22 Jul 2003 11:05:16 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49E0243FBD for ; Tue, 22 Jul 2003 11:05:15 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9/8.12.9) with ESMTP id h6MI4eai007910; Tue, 22 Jul 2003 14:04:40 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h6MI4dCH007907; Tue, 22 Jul 2003 14:04:39 -0400 (EDT) Date: Tue, 22 Jul 2003 14:04:39 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Adam Migus In-Reply-To: <63051.204.254.155.100.1058895811.squirrel@mail.migus.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: Communications kernel -> userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 18:05:16 -0000 On Tue, 22 Jul 2003, Adam Migus wrote: > Perhaps I'm not understanding you right but I think Pawel's idea is > cool. It seems to fulfill your requirements (except being network > specific). I suppose if it were network specific we could optimize it > for packet streams and if we made it complicated enough it would require > quite an elaborate sychronization and notification mechanism. Is that > closer to what have in mind? Well, the case I had particularly in mind was the rapid flow of packets form the kernel to the user process; Pawel's suggestion handles the flow of new data from the user process to the kernel well, and has substantial similarity to some of the IO Lite mechanisms I pointed at (and hopefully with many of the same performance benefits). In the kernel-to-userspace case, we want to avoid the copy of what is originally kernel-owned memory (from the mbuf allocator) to the user process memory. If you didn't care about stuff like confidentiality of kernel memory, etc, the simplest approach would be to actually map the mbuf memory (and possibly cluster) into userspace, and then notify the user process in some form of the new mapping. However, because mbufs and their meta-data aren't page aligned (etc, etc, etc), you really don't want to do it explicitly that way, I suspect. By synchronization, I had in mind a mechanism by which the process and kernel would communicate about memory ownership in the shared memory space: "I'm done with this packet", "I'm done with these packets", "I want to continue delivery of that packet", "I modified this packet", "I'm inserting a new packet here", "I'm dropping this packet", all without extensive memory copying, and with a moderate amount of asynchrony (and possibly parallelism). In terms of functionality, it might be similar to some of the current services that forward between IPDIVERT "in" and "out" (such as natd), or between BPF pseudo-devices. This sounds like something that likely exists in a few commercial products already, so my question to Terry was to whether he knew of any in the literature. IOLite is the closest I know of, as it supports the zero-copy page and memory ownership bits, although I don't know if they allowed it to handle packets, perhaps just datagrams and streams. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 12:00:28 2003 Return-Path: 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 23D0E37B401 for ; Tue, 22 Jul 2003 12:00:28 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD64543FA3 for ; Tue, 22 Jul 2003 12:00:25 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9/8.12.3) with ESMTP id h6MJ06FL051032; Tue, 22 Jul 2003 13:00:06 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 22 Jul 2003 12:59:58 -0600 (MDT) Message-Id: <20030722.125958.16680581.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely12.cicely.de From: "M. Warner Losh" In-Reply-To: <20030722123649.GM511@cicely12.cicely.de> References: <20030721130013.GI19386@cicely12.cicely.de> <200307220004.21883.Danovitsch@Vitsch.net> <20030722123649.GM511@cicely12.cicely.de> X-Mailer: Mew version 2.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: Danovitsch@Vitsch.net cc: FreeBSD-Hackers@freebsd.org Subject: Re: differences in USB support between FreeBSD 4.x and 5.x ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 19:00:28 -0000 In message: <20030722123649.GM511@cicely12.cicely.de> Bernd Walter writes: : On Tue, Jul 22, 2003 at 12:04:21AM +0200, Daan Vreeken [PA4DAN] wrote: : > On Monday 21 July 2003 15:00, Bernd Walter wrote: : > > On Mon, Jul 21, 2003 at 09:18:42AM +0200, Marco Molteni wrote: : > > > [I sent the same message to usb-bsd@eleetbsd.org, but since that list : > > > seems not very active, I am asking here too] : > > > : > > > Hi all, : > > > : > > > the subject says it all. : > > > : > > > I am considering using FreeBSD for a robotics project, and I am : > > > thinking of using 4.x for stability. But, since we will probably use : > > > USB a lot, I am wondering if maybe 5.x is a better choice. : > > : > > I believe 4.x has all you need for your project. : > > If you really find a problem then the missing part can be MFC'ed. : > Both 4.x and 5.x have a pointer-bug in the ugen-driver causing memory to be : > overwritten outside a buffer when using isochronous transfers. I have sent a : > PR about this (with patch) back in April. : > **(: HINT HINT :) ** : > ( pr kern/51186 : http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern%2F51186 ) : : I'll take a look at this. I have some time in my schedule in a few weeks to look at USB issues, so if you don't beat me to it, I'll look then. My first look at the patch suggests it is correct. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 12:57:01 2003 Return-Path: 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 5FD4237B404; Tue, 22 Jul 2003 12:57:01 -0700 (PDT) Received: from garple.migus.org (pcp243383pcs.howard01.md.comcast.net [68.55.83.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 292AF43FA3; Tue, 22 Jul 2003 12:57:00 -0700 (PDT) (envelope-from adam@migus.org) Received: from garple.migus.org (localhost [127.0.0.1]) by garple.migus.org (8.12.9/8.12.9) with ESMTP id h6MJuw6a024881; Tue, 22 Jul 2003 15:56:58 -0400 (EDT) (envelope-from adam@migus.org) Received: (from www@localhost) by garple.migus.org (8.12.9/8.12.9/Submit) id h6MJuw4m024880; Tue, 22 Jul 2003 15:56:58 -0400 (EDT) X-Authentication-Warning: garple.migus.org: www set sender to adam@migus.org using -f Received: from 204.254.155.100 (SquirrelMail authenticated user adam) by mail.migus.org with HTTP; Tue, 22 Jul 2003 15:56:58 -0400 (EDT) Message-ID: <34134.204.254.155.100.1058903818.squirrel@mail.migus.org> In-Reply-To: References: <63051.204.254.155.100.1058895811.squirrel@mail.migus.org> Date: Tue, 22 Jul 2003 15:56:58 -0400 (EDT) From: "Adam Migus" To: "Robert Watson" User-Agent: SquirrelMail/1.4.1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Spam-Status: No, hits=-0.9 required=5.0 tests=IN_REP_TO,PRIORITY_NO_NAME,REFERENCES,USER_AGENT, X_AUTH_WARNING version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-hackers@freebsd.org Subject: Re: Communications kernel -> userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 19:57:01 -0000 Robert Watson said: > > Well, the case I had particularly in mind was the rapid > flow of packets > form the kernel to the user process; Pawel's suggestion > handles the flow > of new data from the user process to the kernel well, > and has substantial > similarity to some of the IO Lite mechanisms I pointed > at (and hopefully > with many of the same performance benefits). In the > kernel-to-userspace > case, we want to avoid the copy of what is originally > kernel-owned memory > (from the mbuf allocator) to the user process memory. > If you didn't care > about stuff like confidentiality of kernel memory, etc, > the simplest > approach would be to actually map the mbuf memory (and > possibly cluster) > into userspace, and then notify the user process in > some form of the new > mapping. However, because mbufs and their meta-data > aren't page aligned > (etc, etc, etc), you really don't want to do it > explicitly that way, I > suspect. Ok, I think I understand a little better. The DMA analogy combined with the somewhat obscure bracketed requirements below it caused me to get a little confused. As for the page alignment issue have you checked out the new MBUMA stuff Bosko's doing? It uses (and abstracts) mbuf allocation over uma. Perhaps it could be taylored to fit your requirements. > > By synchronization, I had in mind a mechanism by which > the process and > kernel would communicate about memory ownership in the > shared memory > space: "I'm done with this packet", "I'm done with > these packets", "I want > to continue delivery of that packet", "I modified this > packet", "I'm > inserting a new packet here", "I'm dropping this > packet", all without > extensive memory copying, and with a moderate amount of > asynchrony (and > possibly parallelism). In terms of functionality, it > might be similar to > some of the current services that forward between > IPDIVERT "in" and "out" > (such as natd), or between BPF pseudo-devices. This > sounds like something > that likely exists in a few commercial products > already, so my question to > Terry was to whether he knew of any in the literature. > IOLite is the > closest I know of, as it supports the zero-copy page > and memory ownership > bits, although I don't know if they allowed it to > handle packets, perhaps > just datagrams and streams. > Given my comments above would it not be possible to offer this mechanism as an extension to the mbuf's own meta-data? -- Adam Migus - Research Scientist Network Associates Laboratories (http://www.nailabs.com) From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 13:41:20 2003 Return-Path: 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 5D13037B401 for ; Tue, 22 Jul 2003 13:41:20 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5512443FAF for ; Tue, 22 Jul 2003 13:41:19 -0700 (PDT) (envelope-from freebsd-hackers@m.gmane.org) Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19f3vZ-00015E-00 for ; Tue, 22 Jul 2003 22:40:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19f3jv-00008l-00 for ; Tue, 22 Jul 2003 22:28:03 +0200 From: othermark Date: Tue, 22 Jul 2003 20:28:03 +0000 (UTC) Lines: 32 Message-ID: X-Complaints-To: usenet@main.gmane.org User-Agent: slrn/0.9.7.4 (FreeBSD) Sender: news Subject: sys/dev/ppbus/lpt.c "advanced mode not available, polling" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 20:41:20 -0000 I posted a message earlier to -stable, but maybe this a better forum for this question. I have a print server at home running -stable, and as part of bootup I run lptcontrol -e to enable extended mode on the port (since it comes up in compatible mode, I could set this with flags in the kernel). It seems without doing this, things sent to the printer take forever to print. During anysort of print operation I get thousands of these messages, generated by line 788 of sys/dev/ppbus/lpt.c: 786 case EINVAL: 787 /* advanced mode not avail */ 788 log(LOG_NOTICE, LPT_NAME "%d: advanced mode not avail, polling\n", unit); 789 break; This is quite annoying, so I wanted to know why I was getting this message because it seems that it occurs even with just lptcontrol -p. I was wondering if there's any reason why this could not be done in the case with EINVAL was returned from ppb_write() instead of just complaining about it foreach call to ppb_write(). Something like: sc->sc_irq &= (~LP_ENABLE_EXT); sc->sc_irq |= LP_ENABLE_IRQ; added to the EINVAL case block. --- Mark atkin901 at NOSPAM yahoo dot com (!wired)?(coffee++):(wired); From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 14:40:19 2003 Return-Path: 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 4AE4E37B401; Tue, 22 Jul 2003 14:40:19 -0700 (PDT) Received: from garple.migus.org (pcp243383pcs.howard01.md.comcast.net [68.55.83.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57AAA43F93; Tue, 22 Jul 2003 14:40:18 -0700 (PDT) (envelope-from adam@migus.org) Received: from garple.migus.org (localhost [127.0.0.1]) by garple.migus.org (8.12.9/8.12.9) with ESMTP id h6MLeC6a025859; Tue, 22 Jul 2003 17:40:13 -0400 (EDT) (envelope-from adam@migus.org) Received: (from www@localhost) by garple.migus.org (8.12.9/8.12.9/Submit) id h6MLeCwT025858; Tue, 22 Jul 2003 17:40:12 -0400 (EDT) X-Authentication-Warning: garple.migus.org: www set sender to adam@migus.org using -f Received: from 204.254.155.100 (SquirrelMail authenticated user adam) by mail.migus.org with HTTP; Tue, 22 Jul 2003 17:40:12 -0400 (EDT) Message-ID: <36373.204.254.155.100.1058910012.squirrel@mail.migus.org> In-Reply-To: <3F18D263.1BFE6BE3@mindspring.com> References: <3F18D263.1BFE6BE3@mindspring.com> Date: Tue, 22 Jul 2003 17:40:12 -0400 (EDT) From: "Adam Migus" To: "Terry Lambert" User-Agent: SquirrelMail/1.4.1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Spam-Status: No, hits=-0.9 required=5.0 tests=IN_REP_TO,PRIORITY_NO_NAME,REFERENCES,USER_AGENT, X_AUTH_WARNING version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-hackers@freebsd.org cc: Robert Watson Subject: Re: running 5.1-RELEASE with no procfs mounted (lockups?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2003 21:40:19 -0000 Terry Lambert said: > The problem is that ktrace/kdump rendesvous at a file; > truss does > not, so it has some capabilities that ktrace does not. > In some > circumstances (e.g. a system crash, where kdump doesn't > get a > chance to get at the file, because it's "cleaned up" > and not > even fully written, when it's not "cleaned up") ktrace > loses > utterly. > Would something like: live_ktrace() { local _kf="`mktemp -t ktrace.$$`"; ktrace -p $1 -f $_kf; kdump -lf $_kf; rm -f $_kf; } do what you want? -- Adam Migus - Research Scientist Network Associates Laboratories (http://www.nailabs.com) From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 19:08:10 2003 Return-Path: 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 B23D537B401 for ; Tue, 22 Jul 2003 19:08:10 -0700 (PDT) Received: from shiva.warpcore.org (shiva.warpcore.org [208.2.70.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12CE843F93 for ; Tue, 22 Jul 2003 19:08:10 -0700 (PDT) (envelope-from drevil@warpcore.org) Received: from [65.26.140.154] (CPE-65-26-140-154.kc.rr.com [65.26.140.154]) by shiva.warpcore.org (8.12.9/8.12.9) with ESMTP id h6N289dv015059 for ; Tue, 22 Jul 2003 21:08:09 -0500 From: Shawn To: freebsd-hackers@freebsd.org In-Reply-To: <3F1CE1EA.9A9E5657@mindspring.com> References: <1058844639.2136.22.camel@CPE-65-26-140-154.kc.rr.com> <3F1CE1EA.9A9E5657@mindspring.com> Content-Type: text/plain Organization: http://drevil.warpcore.org/ Message-Id: <1058926092.36882.17.camel@CPE-65-26-140-154.kc.rr.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 22 Jul 2003 21:08:13 -0500 Content-Transfer-Encoding: 7bit Subject: Re: Where / how to begin the FreeBSD development journey? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2003 02:08:11 -0000 > On Tue, 2003-07-22 at 02:04, Terry Lambert wrote: > There's a wide range of options, from the expensive to the free > online stuff. At the high end, we have: > > $1300 https://www.mckusick.com/courses/introorderform.html > $1500 https://www.mckusick.com/courses/advorderform.html Sadly, he doesn't teach these classes anymore (due to lack of students), and I don't live anywhere near there. Also, the price is indeed prohibitive. > At the low end, we have things like: > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/index.html Yes, I have read what I believe are the relevant sections of the normal handbook, I spent the time while 5.1 was installing to read it. > http://www.vsi.ru/library/Programmer/fbsdkern/ Nice to know, the information in the Developer's Handbook seems to be far more recent and thorough although admittedly PCI DMA information is currently out of date according to the document. > You could also look at the "Blue Prints" column at the web site > > http://www.daemonnews.org/ Yes, I read the entire Blue Prints column there. Great information on the basic kernel / userland interface architecture. > There is also a "new users" section there: > > http://www.daemonnews.org/new2bsd/ I read all of the articles in the Getting Started and Basic Skills categories today. The rest of the articles mainly deal with basic system configuration which should prove helpful as a reference should I ever need it. Well, I must thank you for all the various references to information that has certainly proved informative and helpful. I will continue to peruse the mailing list archives and finish reading the developer's handbook (of which I am almost done reading, although admittedly I did skip the IPV6, ISA, SCSI, USB chapters, as they do not currently interest me). I can't believe I never spotted the Developer's Handbook before. Thanks, -- Shawn http://drevil.warpcore.org/ From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 22 23:45:27 2003 Return-Path: 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 71C1537B401 for ; Tue, 22 Jul 2003 23:45:27 -0700 (PDT) Received: from bluejay.mail.pas.earthlink.net (bluejay.mail.pas.earthlink.net [207.217.120.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE61743F75 for ; Tue, 22 Jul 2003 23:45:26 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfkao.dialup.mindspring.com ([165.247.209.88] helo=mindspring.com) by bluejay.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19fDNN-0003i8-00; Tue, 22 Jul 2003 23:45:25 -0700 Message-ID: <3F1E2EBE.1831D1CA@mindspring.com> Date: Tue, 22 Jul 2003 23:44:14 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Shawn References: <1058844639.2136.22.camel@CPE-65-26-140-154.kc.rr.com> <1058926092.36882.17.camel@CPE-65-26-140-154.kc.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a44d3df4433e3a96487a1763831ccb0b22666fa475841a1c7a350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org Subject: Re: Where / how to begin the FreeBSD development journey? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2003 06:45:27 -0000 Shawn wrote: > > On Tue, 2003-07-22 at 02:04, Terry Lambert wrote: > > There's a wide range of options, from the expensive to the free > > online stuff. At the high end, we have: > > > > $1300 https://www.mckusick.com/courses/introorderform.html > > $1500 https://www.mckusick.com/courses/advorderform.html > > Sadly, he doesn't teach these classes anymore (due to lack of students), > and I don't live anywhere near there. Also, the price is indeed > prohibitive. It's the price for the video tapes of the class. I agree that it's prohibitive. He states at the link, though, that he gives a 50% discount to students, and is willing to work with hardship cases to negotiate a fair price. No harm in asking him about it. > > http://www.vsi.ru/library/Programmer/fbsdkern/ > > Nice to know, the information in the Developer's Handbook seems to be > far more recent and thorough although admittedly PCI DMA information is > currently out of date according to the document. The steady state of all documentation is "needs to be updated"... -- Terry From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 23 02:50:35 2003 Return-Path: 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 19E5D37B401 for ; Wed, 23 Jul 2003 02:50:35 -0700 (PDT) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id D137F43FBD for ; Wed, 23 Jul 2003 02:50:33 -0700 (PDT) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h6N9oWv20113 for ; Wed, 23 Jul 2003 11:50:32 +0200 (MEST) Date: Wed, 23 Jul 2003 11:50:32 +0200 (CEST) From: Harti Brandt To: hackers@freebsd.org Message-ID: <20030723114635.M44579@beagle.fokus.fraunhofer.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: rc.d review/hint needed X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2003 09:50:35 -0000 Hi all, I have tried to hack the harp(4) pseudo-driver into rc.d/atm*. While doing this I have found a bug in these scripts and decided to fix it and un-.sh atm2.sh and atm3.sh. The problem with harp(4) is that the real physical interfaces need to be brought up BEFORE atm1 via ifconfig, while the interfaces created by atm1 must be configured (with netif) AFTER atm1. Could please someone with enough rc.d knowledge look at the patch at: http://people.freebsd.org/~harti/patches/rc.d.atm.html Regards, harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 23 10:30:12 2003 Return-Path: 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 72CD537B401 for ; Wed, 23 Jul 2003 10:30:12 -0700 (PDT) Received: from smartrafficenter.org (pacer.smartrafficenter.org [207.14.56.3]) by mx1.FreeBSD.org (Postfix) with SMTP id BF73943FAF for ; Wed, 23 Jul 2003 10:30:10 -0700 (PDT) (envelope-from kpieckiel@smartrafficenter.org) Received: (qmail 70705 invoked by uid 1500); 23 Jul 2003 17:30:07 -0000 Date: Wed, 23 Jul 2003 13:30:07 -0400 From: "Kevin A. Pieckiel" To: freebsd-hackers@freebsd.org Message-ID: <20030723173007.GD41280@pacer.dmz.smartrafficenter.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0vzXIDBeUiKkjNJl" Content-Disposition: inline User-Agent: Mutt/1.4i Subject: mbuf cluster shortage caused kernel panic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2003 17:30:12 -0000 --0vzXIDBeUiKkjNJl Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: quoted-printable #uname -a FreeBSD fileserver1.smartrafficenter.net 4.7-STABLE FreeBSD 4.7-STABLE #0: = Mon Dec 16 19:41:03 EST 2002 toor@fileserver1.smartrafficenter.net:/usr= /obj/usr/src/sys/FILESERVER1 i386 Running 4.7 stable with sources CVSed on 16 Dec 2002. My fileserver has been running since 17 Dec 2002 and suddenly lost its ability to talk on the network today. Went to the console to discover a flood of messages that it was out of mbuf clusters, read tuning(7) for more info. I immediately ran netstat -m and saw indeed there were 6656 mbuf clusters allocated, 6656 used, and 6656 peak. A number of requests for memory were being denied at this point. While browsing the tuning(7) man page for where and how to increase this number, the kernel panicked. The computer is a Dell PowerEdge 1650 with two 1.4 GHz P-III processors and 1 GB RAM. Output of dmesg and gdb on debug kernel and core file is provided below. Kernel config file is attached. What can I do to help solve any problems that might exist in the kernel code, and what suggestions do you have to keep this from happening on my fileserver again? Kernel, debug kernel, CVS date, kernel config, and core file can be made available upon request. Thanks much, Kevin A. Pieckiel ---- #dmesg 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-STABLE #0: Mon Dec 16 19:41:03 EST 2002 toor@fileserver1.smartrafficenter.net:/usr/obj/usr/src/sys/FILESERVER1 Timecounter "i8254" frequency 1193182 Hz CPU: Pentium III/Pentium III Xeon/Celeron (1396.45-MHz 686-class CPU) Origin =3D "GenuineIntel" Id =3D 0x6b1 Stepping =3D 1 Features=3D0x383fbff real memory =3D 1073676288 (1048512K bytes) avail memory =3D 1042231296 (1017804K bytes) Changing APIC ID for IO APIC #0 from 0 to 2 on chip Changing APIC ID for IO APIC #1 from 0 to 3 on chip Programming 16 pins in IOAPIC #0 IOAPIC #0 intpin 2 -> irq 0 Programming 16 pins in IOAPIC #1 FreeBSD/SMP: Multiprocessor motherboard cpu0 (BSP): apic id: 1, version: 0x00040011, at 0xfee00000 cpu1 (AP): apic id: 0, version: 0x00040011, at 0xfee00000 io0 (APIC): apic id: 2, version: 0x000f0011, at 0xfec00000 io1 (APIC): apic id: 3, version: 0x000f0011, at 0xfec01000 Preloaded elf kernel "kernel" at 0xc02d1000. Preloaded userconfig_script "/boot/kernel.conf" at 0xc02d109c. Pentium Pro MTRR support enabled Using $PIR table, 9 entries at 0xc00fc220 npx0: on motherboard npx0: INT 16 interface pcib1: on motherboard IOAPIC #1 intpin 1 -> irq 2 IOAPIC #1 intpin 0 -> irq 3 IOAPIC #1 intpin 2 -> irq 5 IOAPIC #1 intpin 3 -> irq 7 pci1: on pcib1 em0: port 0xdce0-0x= dcff mem 0xfeb40000-0xfeb5ffff,0xfeb60000-0xfeb7ffff irq 2 at device 2.0 on= pci1 em0: Speed:1000 Mbps Duplex:Full em1: port 0xdcc0-0x= dcdf mem 0xfeb00000-0xfeb1ffff,0xfeb20000-0xfeb3ffff irq 3 at device 4.0 on= pci1 em1: Speed:N/A Duplex:N/A ahc0: port 0xd800-0xd8ff mem 0xfeb8= 1000-0xfeb81fff irq 5 at device 6.0 on pci1 aic7899: Ultra160 Wide Channel A, SCSI Id=3D7, 32/253 SCBs ahc1: port 0xd400-0xd4ff mem 0xfeb8= 0000-0xfeb80fff irq 7 at device 6.1 on pci1 aic7899: Ultra160 Wide Channel B, SCSI Id=3D7, 32/253 SCBs pcib0: on motherboard pci0: on pcib0 pci0: at 12.0 atapci0: port 0x8b0-0x8bf,0x374-0x377,= 0x170-0x177,0x3f4-0x3f7,0x1f0-0x1f7 at device 15.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 pci0: at 15.2 irq 11 isab0: at device 15.3 on = pci0 isa0: on isab0 pcib2: on motherboard IOAPIC #1 intpin 4 -> irq 13 IOAPIC #1 intpin 8 -> irq 16 IOAPIC #1 intpin 9 -> irq 17 pci2: on pcib2 ahc2: port 0xcc00-0xccff mem 0xfe903000= -0xfe903fff irq 13 at device 8.0 on pci2 aic7896/97: Ultra2 Wide Channel A, SCSI Id=3D7, 32/253 SCBs ahc3: port 0xc800-0xc8ff mem 0xfe902000= -0xfe902fff irq 13 at device 8.1 on pci2 aic7896/97: Ultra2 Wide Channel B, SCSI Id=3D7, 32/253 SCBs ahc4: port 0xc400-0xc4ff mem 0xfe9010= 00-0xfe901fff irq 16 at device 10.0 on pci2 aic7899: Ultra160 Wide Channel A, SCSI Id=3D7, 32/253 SCBs ahc5: port 0xc000-0xc0ff mem 0xfe9000= 00-0xfe900fff irq 17 at device 10.1 on pci2 aic7899: Ultra160 Wide Channel B, SCSI Id=3D7, 32/253 SCBs pcib3: on motherboard pci3: on pcib3 pcib4: on motherboard pci4: on pcib4 orm0: