Re: Phobos 4-port NIC
Eric Busto wrote: Howdy, I have recently acquired a pair of Phobos 4-port NIC's, the P430TX model. On it, it has 4 Intel 21143TD chips, and one larger Intel 21152AB chip. Hello, this seems similar to the DLINK D570-TX 4-port NIC, which works very well with the dc driver -- Thierry Herbelot To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Bug in /bin/sh's handling of case ... esac?
While working with the apache-2.0 source I encountered the following construct in a config.status file, generated using autoconf 2.52: lizzy:/usr/src/bin/sh# cat /tmp/esac case $foo in esac lizzy:/usr/src/bin/sh# /bin/sh /tmp/esac /tmp/esac: 3: Syntax error: end of file unexpected (expecting )) lizzy:/usr/src/bin/sh# However, POSIX 1003.1 says this construct is valid: The format for the case construct is as follows: case word in [(] pattern1) compound-list;; [[(] pattern[ | pattern] ... ) compound-list;;] ... [[(] pattern[ | pattern] ... ) compound-list] esac The ;; is optional for the last compound-list. so I am concluding that we erroneously flag this as an error. Fwiw, zsh and bash accept this construct without complaining. The following patch seems to fix the problem, but I have _no_ idea whether this is the correct fix and what this breaks. Ideas, anyone? --- parser.cSat Jan 5 00:23:27 2002 +++ parser.c.newSat Jan 5 00:23:05 2002 @@ -429,6 +429,8 @@ noaliases = 1; /* turn off alias expansion */ checkkwd = 2, readtoken(); do { + if (lasttoken == TESAC) + break; *cpp = cp = (union node *)stalloc(sizeof (struct nclist)); cp-type = NCLIST; app = cp-nclist.pattern; -- Jos Backus _/ _/_/_/Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/_/ [EMAIL PROTECTED] _/_/ _/_/_/use Std::Disclaimer; To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
RE: Does FreeBSD have a problem with some AMD processors?
Greg, One question... are you using the latest mobo BIOS? My friend purchased that board and threw a 1.2GHz TBird in it. It was quite unstable until he upgraded the BIOS. When I purchased my board, it was the 1st thing I did and I haven't have any trouble with it yet. I've got a 1.1GHz and 3 128MB PC133 (mixed brands on top of it all) DIMMs in there. Lots-o-ATA devices, and I'm currently running 4.4-STABLE. The box is solid as a rock, have yet to cause it to panic/crash/etc... --Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Greg Lehey Sent: Friday, December 28, 2001 2:40 AM To: FreeBSD Questions; FreeBSD Hackers Subject: Does FreeBSD have a problem with some AMD processors? I've been using AMD processors almost exclusively in my main work machines for over 4 years, and I've been very happy with them. I'm currently running a K6/233, a K6/333, an Athlon 750, a Duron 850 and an Athlon XP 1700. Last August, though, I bought a machine which gave me a lot of trouble, the Duron 850 mentioned above. I found that it would freeze for no apparent reason. I established that it wasn't the memory by taking the memory of another machine and running it like that; it made no difference. I ended up also changing the motherboard and the processor, but the hangs continued. I could expect a hang within 8 hours when doing 'make release' Just for the fun of it, I tried running Linux on it. I've been running a kernel build and 'make clean' on it now for 36 hours, and it's still running fine. Yesterday some Linux friends of mine came around and looked at it and told me that the Linux kernel I was running on the machine (2.4.16) had had a number of AMD-specific fixes put in. He didn't go into more detail, unfortunately, but I'll ask him again when I have time: it could be something relating to chipset bugs we have seen and fixed. It would help to know, though, if other people are experiencing similar problems. Please let me know if you're having problems with AMD processors which seem to be specific to FreeBSD, especially if they're hangs (i.e. the machine stops reacting, but the display still shows the last state, it doesn't reboot or panic). Information that could be interesting is (here my values): Processor:AMD Duron 850 Motherboard: ECS K7VZA Memory: 1 128 MB SIMM, 100 MHz. Greg -- For more information, see http://www.lemis.com/questions.html Finger [EMAIL PROTECTED] for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: what slice did I boot from?
On Fri, 4 Jan 2002, Louis A. Mamakos wrote: I've got one of the litle soekris net4501 boards that I use as a router/firewall/NAT box, and it works really good. I have a stripped down FreeBSD system that I run in a 16MB partition on an 32MB Compact Flash card plugged into the net4501. Actually, I have two 16MB slices, and my goal is to be running from one, and installing the next version into the second slice. That way, if the new one distribution screws up, I can back-out to the older on on the other partition. I've actually been monkeying with this and ran into a bigger problem .. boot2 only knows how to handle one FreeBSD slice. You have to play loader(8) tricks to boot the second slice. Specifically... . abort the kernel load . 'set currdev=disk1s2a:' . 'load /boot/kernel/kernel' (and so forth) Particularly if you are running -CURRENT you must compile in your device hints, otherwise everything gets confused. For picking the appropriate slice, you are up a creek all right. Assumably at some point you have to select a slice anyway, and you can use that to rewrite fstab. Depending on the old compatibilty slice will certainly get you in hot water. I've been thinking about hacking up some forth to handle this switching programatically, so you get a nice menu to pick which FreeBSD slice to boot from if you enable the feature. Doug White| FreeBSD: The Power to Serve [EMAIL PROTECTED] | www.FreeBSD.org To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: sessionlimit
On Sat, 5 Jan 2002, Thomas Wahyudi wrote: Hi all, if I want to change behavior of sessionlimit behavior in login.conf, where I should look first since I can't find it in /usr/src/libutil thx before. In a lot of cases, the capabilities have been defined but not actually implemented anywhere. sessionlimit may be one such option. I'd suggest checking login(8) since that's what generally enforces the limits (libutil just reads them). Doug White| FreeBSD: The Power to Serve [EMAIL PROTECTED] | www.FreeBSD.org To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Overriding ARG_MAX
David Miller wrote: Probably, you are doing something whic you aren't telling us, like saying ls *.c | wc -l or otherwise using globbing that the shell expands to too large a list. The easy answer is use ``find'' instead of ``ls''. Indeed, but it doesn't answer the basic questions, which was: Is there any easy way to override ARG_MAX (or arbitrary other paramaters) in make.conf or a config file, or something else altogether? No, there is no easy way. The limit is there in the POSIX standard, and it exists because of the need to pass data from a parent to a child over a fork + exec. The correct answer is to use find, and either pipe or call xargs on the output. No matter what you do, you are going to not overcome the limit on programs that are already built (like your shell), which includded the header file and referenced the manifest constant where the limit is defined. So compatability with exiting binary apoplications already limits any change you might want to make to this. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: path_mtu_discovery
M. Warner Losh wrote: In message: [EMAIL PROTECTED] Rogier R. Mulhuijzen [EMAIL PROTECTED] writes: : Out of curiosity, where do MTUs ~512 occur? Old slip links that used it to reduce latency. I suspect that there aren't too many of them left in the world. PPPOE over modem links can do this, as well. There are also intentional flow limits set on ATM muxes which implement the leaky bucket algorithm (c.v. Tom Ndousse, PhD's work on leaky bucket; I think he's at Arizona in Tucson, right now...). -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: path_mtu_discovery
On Fri, Jan 04, 2002 at 03:11:45PM -0800, Terry Lambert wrote: I knew that I could multiply the number of packets sent by a factor of 5... I was pointing out a flaw in the idea of allowing path MTU ICMP back in, unconditionally... Thre is nothing 'unconditionally' in ipfilter. The IP packetheader and the first 8 bytes of the UDP/ICMP/TCP header are examined and checked if they match a valid state entry. -Guido To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
About the MAKEDEV script
hi all, is it true, that the MAKEDEV script only appears if the DEVFS option in the kernel is not enabled, or I am talking nuts..? The reason I am asking is because, when I built my first CURRENT, the MAKEDEV script disappeared out of the blue. If I am right, will this be like that in the 4.5 release of FreeBSD? thanks, regards, - Hiten - [EMAIL PROTECTED] = SSH Fingerprint: 1024 45:a5:9c:f2:fb:07:da:70:18:02:0b:f3:63:f1:7a:a6 [EMAIL PROTECTED] __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: About the MAKEDEV script
In message [EMAIL PROTECTED], Hiten Pandya w rites: hi all, is it true, that the MAKEDEV script only appears if the DEVFS option in the kernel is not enabled, or I am talking nuts..? if DEVFS is in the kernel, it mounts over /dev and consequently you cannot see the MAKEDEV script. /dev/MAKEDEV should have lived in /etc from the beginning anyway... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
about sysinstall(8) package managment
hi all, I was wondering that, the sysinstall(8) utility doesn't have package managment facilities designed for people to view even if they don't have some kind of connection to the media. Example: When you select the 'packages' option, it will ask you about your media type. If someone doesn't have any of the media, than, they wouldn't be able to know what packages are installed on their system. (Only by doing pkg_info, but not from sysinstall.. :) What I am suggesting is, that we can make a section in the sysinstall configure menu, where we can show all the currently installed packages, and we can link up the current pkg routines such as adding, removing, so that people can easily see what packages are installed, and they can also remove them from that menu.. let me know about your views on this.. thanks, regards, - Hiten - [EMAIL PROTECTED] = SSH Fingerprint: 1024 45:a5:9c:f2:fb:07:da:70:18:02:0b:f3:63:f1:7a:a6 [EMAIL PROTECTED] __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: what slice did I boot from?
On Fri, 4 Jan 2002, Louis A. Mamakos wrote: I've got one of the litle soekris net4501 boards that I use as a router/firewall/NAT box, and it works really good. I have a stripped down FreeBSD system that I run in a 16MB partition on an 32MB Compact Flash card plugged into the net4501. Actually, I have two 16MB slices, and my goal is to be running from one, and installing the next version into the second slice. That way, if the new one distribution screws up, I can back-out to the older on on the other partition. I've actually been monkeying with this and ran into a bigger problem .. boot2 only knows how to handle one FreeBSD slice. You have to play loader(8) tricks to boot the second slice. Specifically... . abort the kernel load . 'set currdev=disk1s2a:' . 'load /boot/kernel/kernel' (and so forth) Particularly if you are running -CURRENT you must compile in your device hints, otherwise everything gets confused. Hmm.. I'm running a 4.4-STABLE based system on the hardware, and don't seem to have any problem booting off the other slice. Right now, it's runnong on the second slice of ATA Compact Flash disk: # kenv LINES=24 console=vidconsole currdev=disk0s2a: interpret=ok kernel=/kernel kernel_options= kernelname=/kernel loaddev=disk0s2a: root_disk_unit=0 vfs.root.mountfrom=ufs:/dev/ad0s2a # The other slice is ad0s1. And I checked, the kernel that's running actually did make it out of that slice, and not the first one. For picking the appropriate slice, you are up a creek all right. Assumably at some point you have to select a slice anyway, and you can use that to rewrite fstab. Depending on the old compatibilty slice will certainly get you in hot water. It would be just fine to have the boot0 boot manager be the mechanism to do all this. That's an easy toggle between the two alternatives, though harder to do an automatic fallback, perhaps. I've been thinking about hacking up some forth to handle this switching programatically, so you get a nice menu to pick which FreeBSD slice to boot from if you enable the feature. Where this mechanism might be useful is to detect abnormal shutdowns (too many, too quickly) and use that to backup to the other partition. I dunno, that might be more complicated and automagic than I need for the moment, since the software seems fairly stable, and the hardware is accessable for manual diddling if necessary. I'm wondering if just generating the fstab on the fly might be sufficient; I should be able to use kenv to get the vfs.root.mountfrom loader variable (which strangely enough, isn't exported as a sysctl) and go from there. Hmm.. louie To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
psm weird on 4.5-PRERELEASE?
I just lost my mouse (well, it is a Kensington Orbit trackball) in the middle of an X session. The console says: pid 1597 (communicator-lin), uid 1000: exited on signal 10 (core dumped) psm0: failed to disable the device (psmclose). psm0: failed to get status (psmclose). psm0: failed to enable the device (doopen). This is on: FreeBSD freebie.xs4all.nl 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #3: Fri Jan 4 08:14:34 CET 2002 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/FREEBIE i386 I killed moused and tried to restart it. Moused reported 'psm0 device not configured'. Never seen this before. Any clues? Wilko -- | / o / /_ _ email: [EMAIL PROTECTED] |/|/ / / /( (_) Bulte Arnhem, The Netherlands To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: path_mtu_discovery
On Fri, Jan 04, 2002 at 06:02:10PM -0500, Louis A. Mamakos wrote: One possibility is that the code in icmp_input() processing the PMTU discovery-induced ICMP message could verify that the returned header in fact is associated with a connection on the host and maybe even has sane sequence numbers (for TCP segments). The code does that today src/sys/netinet/tcp_subr.c in tcp_ctlinput() added in rev 1.94 on february 26th 2001 when it was moved from src/sys/netinet/in_pcb.c in_pcbnotify() added in rev 1.70 on december 24th 2000 This would make it more difficult to just spray these packets at host and drop the MTU on routes. /Jesper -- Jesper Skriver, jesper(at)skriver(dot)dk - CCIE #5456 Work:Network manager @ AS3292 (Tele Danmark DataNetworks) Private: FreeBSD committer @ AS2109 (A much smaller network ;-) One Unix to rule them all, One Resolver to find them, One IP to bring them all and in the zone to bind them. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Five Dollar Reports
Dear Friend: AS SEEN ON NATIONAL TV: ''Making over half million dollars every 4 to 5 months from your home for an investment of only $25 U.S. Dollars expense one time'' THANKS TO THE COMPUTER AGE AND THE INTERNET! Before you say ''Bull'', please read the following. This is the letter you have been hearing about on the news lately. Due to the popularity of this letter on the Internet, a national weekly news program recently devoted an entire show to the investigation of this program described below, to see if it really can make people money. The show also investigated whether or not the program was legal. Their findings proved once and for all that there are ''absolutely NO Laws prohibiting the participation in the program and if people can follow the simple instructions, they are bound to make some mega bucks with only $25 out of pocket cost''. DUE TO THE RECENT INCREASE OF POPULARITY RESPECT THIS PROGRAM HAS ATTAINED, IT IS CURRENTLY WORKING BETTER THAN EVER. This is what one had to say: ''Thanks to this profitable opportunity. I was approached many times before but each time I passed on it. I am so glad I finally joined just to see what one could expect in return for the minimal effort and money required. To my astonishment, I received total $ 610,470.00 in21 weeks, with money still coming in''. Pam Hedland, Fort Lee, New Jersey. - Here is another testimonial: 'This program has been around for a long time but I never believed in it, but one day when I received this again in the mail I decided to gamble my $25 on it. I followed the simple instructions and walaa . 3 weeks later the money started to come in. First month I only made $240.00 but the next 2 months after that I made a total of $290,000.00. So far, in the past 8 months by re-entering the program, I have made over $710,000.00 and I am playing it again. The key to success in this program is to follow the simple steps and NOTchange anything.'' More testimonials later but first, *** PRINT THIS NOW FOR YOUR FUTURE REFERENCE *** $$$ If you would like to make at least $500,000 every 4 to 5 months easily and comfortably, please read the following...THEN READ IT AGAIN and AGAIN!!! $$$ FOLLOW THE SIMPLE INSTRUCTION BELOW AND YOUR FINANCIAL DREAMS WILL COME TRUE, GUARANTEED! INSTRUCTIONS: Order all 5 reports shown on the list below. For each report, send $5CASH, THE NAME NUMBER OF THE REPORT YOU ARE ORDERING and YOUR E-MAIL ADDRESS to the person whose name appears ON THAT LIST next to the report. MAKE SURE YOUR RETURN ADDRESS IS ON YOUR ENVELOPE TOP LEFT CORNER in case of any mail problems. When you place your order, make sure you order each of the 5 reports. You will need all 5 reports so that you can save them on your computer and resell them. YOUR TOTAL COST $5X 5 = $25.00. Within a few days you will receive, vie e-mail, each of the 5 reports from these 5 different individuals. Save them on your computer so they will be accessible for you to send to the 1,000's of people who will order them from you. Also make a floppy of these reports and keep it on your desk in case something happen to your computer. . IMPORTANT -DO NOT alter the names of the people who are listed next to each report, or their sequence on the list, in any way other than what is instructed below in step '' 1 through 6 '' or you will loose out on majority of your profits. Once you understand the way this works, you will also see how it does not work if you change it. Remember, this method has been tested, and if you alter, it will NOT work!!! People have tried to put their friends/relatives names on all five thinking they could get all the money. But it does not work this way. Believe us, we all have tried to be greedy and then nothing happened. So Do Not try to change anything other than what is instructed. Because if you do, it will not work for you. Remember, honesty reaps the reward!!! 1.. After you have ordered all 5 reports, take this advertisement and REMOVE the name address of the person in REPORT # 5. This person has made it through the cycle and is no doubt counting their fortune. 2 Move the name address in REPORT #4down TO REPORT #5. 3 Move the name address in REPORT #3 down TO REPORT #4. 4 Move the name address in REPORT #2 down TO REPORT #3. 5 Move the name address in REPORT #1 down TO REPORT #2 6 Insert YOUR name address in the REPORT #1 Position. PLEASE MAKE SURE you copy every name address ACCURATELY! = Take this entire letter, with the modified list of names, and save it on your computer. DO NOT MAKE ANY OTHER CHANGES. Save this on a disk as well just in case if you loose any data. To assist you
Re: what slice did I boot from?
On Sat, 5 Jan 2002, Louis A. Mamakos wrote: Hmm.. I'm running a 4.4-STABLE based system on the hardware, and don't seem to have any problem booting off the other slice. Right now, it's runnong on the second slice of ATA Compact Flash disk: # kenv LINES=24 console=vidconsole currdev=disk0s2a: interpret=ok kernel=/kernel kernel_options= kernelname=/kernel loaddev=disk0s2a: root_disk_unit=0 vfs.root.mountfrom=ufs:/dev/ad0s2a # You're playing the same trick I am, just in more words :) Which slice is loader.conf on? It would be just fine to have the boot0 boot manager be the mechanism to do all this. That's an easy toggle between the two alternatives, though harder to do an automatic fallback, perhaps. You try boot0 ... that's where my problem showed up. One would boot but the other says Invalid partition. This is a heavily hacked install though (since sysinstall won't let you put a second / into a second slice when a first FreeBSD slice already exists). Doug White| FreeBSD: The Power to Serve [EMAIL PROTECTED] | www.FreeBSD.org To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: path_mtu_discovery
: Out of curiosity, where do MTUs ~512 occur? Old slip links that used it to reduce latency. I suspect that there aren't too many of them left in the world. You'd be suprised. I measure SLIP's effeciency (in throughput) to be about 5-15% more effecient than PPP in older versions of FreeBSD (both using kernel versions, slip and ppp). Since both were using static configurations on both ends and the only traffic was TCP/IP, there was no reason to use PPP over SLIP so we opted for using the more effecient protocol. I can imagine this is SLIP is still more effecient than PPP in terms of CPU, although I haven't measured it in years. Nate To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Bug in /bin/sh's handling of case ... esac?
On Sat, Jan 05, 2002 at 12:32:25AM -0800, Jos Backus wrote: case $foo in esac case word in [(] pattern1) compound-list;; [[(] pattern[ | pattern] ... ) compound-list;;] ... [[(] pattern[ | pattern] ... ) compound-list] esac Never mind, Alexey V. Neyman pointed out that there are no square brackets around the ``[(] pattern1) compound-list;;'' so at least one pattern needs to be present. zsh and bash are simply more forgivig in this case, presumably because there is no harm in doing so. But since empty case statements are mostly useless the standard behavior that flags them makes more sense. -- Jos Backus _/ _/_/_/Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/_/ [EMAIL PROTECTED] _/_/ _/_/_/use Std::Disclaimer; To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Overriding ARG_MAX
David Miller [EMAIL PROTECTED] wrote: What I usually want to do is something more like ls *.out |wc -l ls | grep '\.out$' | wc -l or grep something *.data ls | grep '\.data$' | xargs grep something or cat *.foo | grep something. ls | grep '\.foo$' | xargs cat | grep something In general, changing ARG_MAX is bad for several reasons. - It makes your commands nonportable. - It only hides the actual problem without really solving it. - It just moves the limit further away, but it doesn't remove it. The alternative commands that I suggested above are portable and work for _any_ number of files, no matter what the ARG_MAX limit is. Sure, they're a bit longer to type, but if you're concerned about that, then you could wrap them into small scripts or shell functions. Regards Oliver -- Oliver Fromme, secnetix GmbH Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. All that we see or seem is just a dream within a dream (E. A. Poe) To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: path_mtu_discovery
Jesper Skriver wrote: On Fri, Jan 04, 2002 at 06:02:10PM -0500, Louis A. Mamakos wrote: One possibility is that the code in icmp_input() processing the PMTU discovery-induced ICMP message could verify that the returned header in fact is associated with a connection on the host and maybe even has sane sequence numbers (for TCP segments). The code does that today That's why you spoof the route between the machine and the next hop, after making a *valid* connection... The only think that can get around it is an overly anal hop count comparison (which could fail, if there were multiple equivalent routes), or turning off the ICMP (which is what started this thread in the first place). -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
SA_NODEFER and signal nesting
Hello: I'm trying to do Async I/O using O_ASYNC on sockets and handling SIGIO. My testing shows that even if I unblock SIGIO at the begining of the handler the kernel only delivers one level of nested signals. Ie: while the first SIGIO is being handled a second might arrive, but a third delivered signal does not reach the process. The same happens if I catch the signals with sigaction and specify SA_NODEFER. Same program on Linux can handle up to 23 nested signals. Is this a known behavior? Is there any way to change it? Thanks in advance for any pointer. Fernando P. Schapachnik [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Overriding ARG_MAX
Ok, there are several issues here that I just have to point out. :-) In a message written on Sat, Jan 05, 2002 at 09:48:40PM +0100, Oliver Fromme wrote: ls | grep '\.out$' | wc -l One process shorter: find -name *.out -maxdepth 0 | wc -l ls | grep '\.data$' | xargs grep something Two problems, first use find, second use /dev/null: find -name *.data -maxdepth 0 | xargs grep something /dev/null ls | grep '\.foo$' | xargs cat | grep somethingA A completely unnecessary use of cat. One of the often missed things is the use of /dev/null on grep in this case. If you grep a single file (grep string file) then it prints the matches. If you grep multiple files (grep string file1 file2) it prints the matches with the file name prepended. When using xargs, if the number of things to search results in just one being left for the last call to grep you will get all of your results prepended with the file name, except for the last file which will be just the results. Adding /dev/null insures grep always has 2 or more files. Another fix would be: find -name *.data -maxdepth 0 | xargs grep -H something I don't believe old grep's had -H though, which is where the /dev/null trick came from. In any event, using find is much better, not so much for this example, but because it allows you to do things like check permissions in a portable way: find -name *.data -perm 444 | xargs grep -H something You can't do that with ls | grep, since only the filenames make it to grep. -- Leo Bicknell - [EMAIL PROTECTED] - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - [EMAIL PROTECTED], www.tmbg.org To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
oddness in aio_procrundown?
ok: at about line 498 in vfs_aio.c: aiocbn = TAILQ_NEXT(aiocbe, plist); fp = fdp-fd_ofiles[aiocbe-uaiocb.aio_fildes]; /* * Under some circumstances, the aio_fildes and the file * structure don't match. This would leave aiocbe's in the * TAILQ associated with the socket and cause a panic later. * * Detect and fix. */ if ((fp == NULL) || (fp != aiocbe-fd_file)) fp = aiocbe-fd_file; So, basically if fp is NULL or not fp != aiocbe-fd_file then it's set to aiocbe-fd_file, doesn't that mean it should just be: fp = aiocbe-fd_file; Index: vfs_aio.c === RCS file: /home/ncvs/src/sys/kern/vfs_aio.c,v retrieving revision 1.107 diff -u -r1.107 vfs_aio.c --- vfs_aio.c 2 Jan 2002 07:04:38 - 1.107 +++ vfs_aio.c 5 Jan 2002 21:21:00 - @@ -496,17 +496,7 @@ for (aiocbe = TAILQ_FIRST(ki-kaio_sockqueue); aiocbe; aiocbe = aiocbn) { aiocbn = TAILQ_NEXT(aiocbe, plist); - fp = fdp-fd_ofiles[aiocbe-uaiocb.aio_fildes]; - - /* -* Under some circumstances, the aio_fildes and the file -* structure don't match. This would leave aiocbe's in the -* TAILQ associated with the socket and cause a panic later. -* -* Detect and fix. -*/ - if ((fp == NULL) || (fp != aiocbe-fd_file)) - fp = aiocbe-fd_file; + fp = aiocbe-fd_file; if (fp) { so = (struct socket *)fp-f_data; TAILQ_REMOVE(so-so_aiojobq, aiocbe, list); -- -Alfred Perlstein [[EMAIL PROTECTED]] 'Instead of asking why a piece of software is using 1970s technology, start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductable donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: SA_NODEFER and signal nesting
Fernando P. Schapachnik wrote: I'm trying to do Async I/O using O_ASYNC on sockets and handling SIGIO. My testing shows that even if I unblock SIGIO at the begining of the handler the kernel only delivers one level of nested signals. Ie: while the first SIGIO is being handled a second might arrive, but a third delivered signal does not reach the process. Yes. Signals are persistant conditions, not events. The same happens if I catch the signals with sigaction and specify SA_NODEFER. Same program on Linux can handle up to 23 nested signals. Depending on Linux's behaviour, which is contrary to conformance to the POSIX standard, will make your code non-portable. Is this a known behavior? Yes. Even better, it's standard. Is there any way to change it? When you get the first SIGIO, set a flag (volatile) in the signal handler. In your main loop, check for the flag, and if it is present, use poll/select to verify that there is data pending, and while there is data pending, retrieve it. At most, you will recheck one extra time for a run of N events (N+1 times), and since you are concerned about N = 23, this overhead is practically non-existant. If you want to avoid the extra system call, then switch to using non-blocking I/O, and when the number of bytes processed by the call is 0, then you are done with that iteration. This approach is portable between all versions of UNIX that support select or poll (you can conditionally compile the code based on the presence or absences of FD_SET_SIZE, or other manifest constants associated solely with the poll or select system calls, so the resulting code will be 100% portable source code). See also the source for the init program, which has to be able to reap child processes, and so has to do SIGCHLD or SIGCLD (depending on your flavor of UNIX) handling the same way. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Overriding ARG_MAX
Leo Bicknell [EMAIL PROTECTED] wrote: In a message written on Sat, Jan 05, 2002 at 09:48:40PM +0100, Oliver Fromme wro te: ls | grep '\.out$' | wc -l One process shorter: find -name *.out -maxdepth 0 | wc -l OK, but I tried to be as portable as possible, while -maxdepth is not portable (e.g. Solaris doesn't have it). ls | grep '\.data$' | xargs grep something Two problems, first use find, second use /dev/null: find -name *.data -maxdepth 0 | xargs grep something /dev/null But that one will give you different result than the original command. I'm well aware of the /dev/null issue, but this wasn't the question in the first place. ls | grep '\.foo$' | xargs cat | grep somethingA A completely unnecessary use of cat. Yep, already in the original command, so I kept it. (I had already typed a comment about useless use of cat in my mail, but deleted it again, thinking that it was intentional to achieve the same effect as grep -h.) You can't do that with ls | grep, since only the filenames make it to grep. You could do it with ls -l | awk, though. ;-) Regards Oliver -- Oliver Fromme, secnetix GmbH Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. All that we see or seem is just a dream within a dream (E. A. Poe) To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Overriding ARG_MAX
Sorry for replying to myself, but this just came to my mind ... Oliver Fromme [EMAIL PROTECTED] wrote: David Miller [EMAIL PROTECTED] wrote: What I usually want to do is something more like ls *.out |wc -l ls | grep '\.out$' | wc -l A smaller solution would be: echo *.out | wc -w Note that the ARG_MAX limitation does not apply to echo, because it is a shell-builtin. Similarly: or grep something *.data ls | grep '\.data$' | xargs grep something echo *.data | xargs grep something or cat *.foo | grep something. ls | grep '\.foo$' | xargs cat | grep something echo *.foo | xargs cat | grep something (Yes, I know, useless cat. The same can probably achieved like this: echo *.foo | xargs grep -h something ) Regards Oliver -- Oliver Fromme, secnetix GmbH Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. All that we see or seem is just a dream within a dream (E. A. Poe) To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: what slice did I boot from?
On Sat, 5 Jan 2002, Louis A. Mamakos wrote: Hmm.. I'm running a 4.4-STABLE based system on the hardware, and don't seem to have any problem booting off the other slice. Right now, it's runnong on the second slice of ATA Compact Flash disk: # kenv LINES=24 console=vidconsole currdev=disk0s2a: interpret=ok kernel=/kernel kernel_options= kernelname=/kernel loaddev=disk0s2a: root_disk_unit=0 vfs.root.mountfrom=ufs:/dev/ad0s2a # You're playing the same trick I am, just in more words :) Which slice is loader.conf on? Sorry, I wasn't clear. I don't have any explicit configuration in my loader.conf; this is just the environment that the loader cooked up all by itself. Each slice has it's own own loader along with a complete root file system. It would be just fine to have the boot0 boot manager be the mechanism to do all this. That's an easy toggle between the two alternatives, though harder to do an automatic fallback, perhaps. You try boot0 ... that's where my problem showed up. One would boot but the other says Invalid partition. This is a heavily hacked install though (since sysinstall won't let you put a second / into a second slice when a first FreeBSD slice already exists). What you might try is making sure that the other partition starts on a cylinder boundary. I've noticed that the BIOS on some machines have real heartburn when the slice starts at some random location not coincident with a cylinder boundary. I don't know why, and I'm pretty sure I don't want to know :=) louie To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Phobos 4-port NIC
In a message dated 01/04/2002 10:54:51 PM Eastern Standard Time, [EMAIL PROTECTED] writes: I have recently acquired a pair of Phobos 4-port NIC's, the P430TX model. On it, it has 4 Intel 21143TD chips, and one larger Intel 21152AB chip. The driver (binary only) provided by Phobos is from 1999. Does FreeBSD have any support for this card? Perhaps by the dc or de drivers? If not, how difficult would it be to add it, keeping in mind I'm best described as a junior junior kernel hacker. : Uh, I'm wondering why anyone would care..considering that DLINK has fundamentally the same card and they are selling it for a ridiculously low price. Phobos always claimed superiority, but its just a PCI bridge and (the same old) 21143 as all of the other 4 port cards (yawn)...if it doesnt work with the dc driver then I'd dump it. DB To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Tell gcc I have a i686
On Fri, Jan 04, 2002 at 12:02:03PM -0600 I heard the voice of Stephen Montgomery-Smith, and lo! it spake thus: I want to create a Makefile for a C program that includes some Pentium II specific inline assembler code. How do I tell the compiler whether we are compiling on a i686? Dunno, how well will your Pentium II specific inline assembler code run on my Pentium Pro? -- Matthew Fuller (MF4839) |[EMAIL PROTECTED] Unix Systems Administrator |[EMAIL PROTECTED] Specializing in FreeBSD |http://www.over-yonder.net/ The only reason I'm burning my candle at both ends, is because I haven't figured out how to light the middle yet To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Tell gcc I have a i686
Matthew D. Fuller wrote: On Fri, Jan 04, 2002 at 12:02:03PM -0600 I heard the voice of Stephen Montgomery-Smith, and lo! it spake thus: I want to create a Makefile for a C program that includes some Pentium II specific inline assembler code. How do I tell the compiler whether we are compiling on a i686? Dunno, how well will your Pentium II specific inline assembler code run on my Pentium Pro? You know, I have no idea. It is someone elses code. These are the instructions. Can anyone tell me? movl 32(%0),%1\n adcl %1,32(%0)\n Also, from this discussion, what I have decided to do is provide it as an option for the user to add by editing the Makefile - not to do it automatically. -- Stephen Montgomery-Smith [EMAIL PROTECTED] http://www.math.missouri.edu/~stephen To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: path_mtu_discovery
On Fri, Jan 04, 2002 at 07:08:16PM -0500, Leo Bicknell wrote: In a message written on Sat, Jan 05, 2002 at 01:14:45AM +0100, Rogier R. Mulhuijzen wrote: If we're on the internet yes. If you're in an environment other than one connected to the internet (do those even exist grin/) no. Hence my tuneable sysctl idea. I'll support a sysctl, however I'll also be quite insistant that our defaults match the Internet. I'm fairly sure more FreeBSD boxes are connected to the Internet than any other network. :-) I'd support it if anyone actually has any credible evidence that such attacks have ever occured. Or if there is are plausible ways to attack that don't require someone to sniff and inject into a connection in which the victim is participating (if you can do that, you can do much worse). The typical SYN flood or DDOS are real threats. This thread (and the previous ones like the one Darren started a few months back) have already expended more energy on the issue than the threat warrants. -- It's always funny until someone gets hurt. Then it's hilarious. Crist J. Clark | [EMAIL PROTECTED] | [EMAIL PROTECTED] http://people.freebsd.org/~cjc/| [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: oddness in aio_procrundown?
Alfred Perlstein wrote: ok: at about line 498 in vfs_aio.c: aiocbn = TAILQ_NEXT(aiocbe, plist); fp = fdp-fd_ofiles[aiocbe-uaiocb.aio_fildes]; /* * Under some circumstances, the aio_fildes and the file * structure don't match. This would leave aiocbe's in the * TAILQ associated with the socket and cause a panic later. * * Detect and fix. */ if ((fp == NULL) || (fp != aiocbe-fd_file)) fp = aiocbe-fd_file; So, basically if fp is NULL or not fp != aiocbe-fd_file then it's set to aiocbe-fd_file, doesn't that mean it should just be: fp = aiocbe-fd_file; I can't explain this bit of weirdness. It existed in the original commit that added support for AIO on sockets. Alan To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message