Re: lang/icc doesn't compile c++ sources
On Tue, 2 Apr 2002 10:34:07 +0200 (CEST) Alexander Leidinger [EMAIL PROTECTED] wrote: On 1 Apr, Simon 'corecode' Schubert wrote: my first tries for the patched include files can be found here: http://corecode.ath.cx/~corecode/stuff/icc-patched-includes-0.1.tgz We should either fix the base system, or ${IA32ROOT}/includes/. i'd really like to, but the headers from the base system are just not standard conformant enough. the headers coming with icc just don't fit our libs; they are specially crafted for use with redhat linux 7.1 :/ i already tried to fix these, but our implementation of the multibyte functions won't let this be an easy task (if it ever can be solved): Do you have test cases where the removal of icc's includes and the use of -X -I/usr/include/g++ -I/usr/include fails? yes. just as simple as that: #include string std::string test; it also fails after fixing the wchar_t thingy. the headers from the base system don't use namespaces correctly... i've tried both 2.95.3 and 3.0.4 headers, look at http://www/~corecode/stuff/patch-include.3.0.4.tgz and .2.95.3.tgz for the results; both still don't compile. to test these, just prepend this one include directory to the search path and use the appropriate g++ include dir. cheerz simon ps: i hope we will get this done some time ;] -- /\ http://corecode.ath.cx/ \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News msg33253/pgp0.pgp Description: PGP signature
Re: lang/icc doesn't compile c++ sources
On 2 Apr, Simon 'corecode' Schubert wrote: Do you have test cases where the removal of icc's includes and the use of -X -I/usr/include/g++ -I/usr/include fails? yes. just as simple as that: #include string std::string test; it also fails after fixing the wchar_t thingy. the headers from the base system don't use namespaces correctly... test.cc, line 4: error: name followed by :: must be a class or namespace name std::string test =Hello World; ^ So we have to fix the base system headers in this regard and discard Intels C++ headers? What about these errors? ---snip--- test.cc: /usr/include/g++/std/bastring.h, line 142: error: too few arguments for class template reverse_iterator typedef ::reverse_iteratoriterator reverse_iterator; ^ /usr/include/g++/std/bastring.h, line 143: error: too few arguments for class template reverse_iterator typedef ::reverse_iteratorconst_iterator const_reverse_iterator; ---snip--- Bye, Alexander. -- ...and that is how we know the Earth to be banana-shaped. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: lang/icc doesn't compile c++ sources
On Tue, 2 Apr 2002 14:30:59 +0200 (CEST) Alexander Leidinger [EMAIL PROTECTED] wrote: On 2 Apr, Simon 'corecode' Schubert wrote: Do you have test cases where the removal of icc's includes and the use of -X -I/usr/include/g++ -I/usr/include fails? yes. just as simple as that: #include string std::string test; it also fails after fixing the wchar_t thingy. the headers from the base system don't use namespaces correctly... test.cc, line 4: error: name followed by :: must be a class or namespace name std::string test =Hello World; ^ So we have to fix the base system headers in this regard and discard Intels C++ headers? What about these errors? ---snip--- test.cc: /usr/include/g++/std/bastring.h, line 142: error: too few arguments for class template reverse_iterator typedef ::reverse_iteratoriterator reverse_iterator; ^ /usr/include/g++/std/bastring.h, line 143: error: too few arguments for class template reverse_iterator typedef ::reverse_iteratorconst_iterator const_reverse_iterator; ---snip--- all these are because the headers from the base system are not standards conformant. i don't think fixing these headers will be an easy task. tomorrow i'll check out if i can somehow patch the icc headers and/or continue to patch the headers coming from gcc 3.0.4 cheerz simon -- /\ http://corecode.ath.cx/#donate \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News msg33255/pgp0.pgp Description: PGP signature
Re: I think Linus wins the April 1st competition this year
Wow. I'm impressed. Linus is too bored if he has time to come up with these things. He should write a new OS or something. Perhaps he could join the LainOS team :-). Robert N M Watson FreeBSD Core Team, TrustedBSD Project [EMAIL PROTECTED] NAI Labs, Safeport Network Services On Mon, 1 Apr 2002, Jordan Hubbard wrote: http://www.cs.helsinki.fi/linux/linux-kernel/2002-13/0063.html Matt or Theo indeed! - Jordan To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Question about possibly additions to TOP
Doesn't top already run in Jail on -CURRENT? Thomas Moestl did this work a while back, exposing the necessary information to support most of our userland monitoring tools using sysctl rather than kvm: last pid: 32655; load averages: 0.05, 0.09, 0.07up 7+14:52:51 09:50:01 2 processes: 1 running, 1 sleeping CPU states: 4.7% user, 0.0% nice, 2.3% system, 1.2% interrupt, 91.8% idle Mem: 61M Active, 21M Inact, 32M Wired, 6932K Cache, 22M Buf, 888K Free Swap: 261M Total, 52M Used, 209M Free, 20% Inuse PID USERNAME PRI NICE SIZERES STATETIME WCPUCPU COMMAND 32652 root 960 1956K 1080K RUN 0:00 0.00% 0.00% top 32650 root 200 1448K 996K pause0:00 0.00% 0.00% tcsh In general, new features for top go into the cross-platform vendor top code, but features to improve FreeBSD-specific information extraction go into our local tree. What exactly does -j do? Robert N M Watson FreeBSD Core Team, TrustedBSD Project [EMAIL PROTECTED] NAI Labs, Safeport Network Services On Mon, 1 Apr 2002, Jon Ringuette wrote: Sorry to bother everyone here but I have a quick question (or I guess what I hope is a quick question). I have made some modifications to src/usr.bin/machine.c to allow TOP to run in a jail (I have mostly just taken out kvm_read's ) and zero'd out alot of information that is not available to TOP in a jail ie . Total memory usage / swap usage / cpu usage etc.. I would like to add an option -j to top and have it check for that option to do this (sort of a really lightweight top if this option is used). Would this be of interest to anymore for me to submit a patch and if so how should I go about adding the -j option should I make a copy of the top.c into src/usr.bin/top or contact the auther of top to see about submitting it to him? I'm not sure if this would be useful to anyone outside of the FreeBSD community is the reason I am a bit iffy about doing that. If someone could point me in the right direction to do this the correct way I would be very grateful, I really want to code but I'm not sure where and how i should do it :) -jon iMeme To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Question about possibly additions to TOP
The real aim, btw, of moving to sysctl was to allow top (and the other utilities) without any extra privilege -- be it setuid, setgid kmem, etc. This had a number of added benefits, including allowing the policy for process/information visibility to be determined entirely in the kernel (required for our modular access control framework in TrustedBSD), let it run in jail, gradually deprecate kvm for statistics reporting, etc. Robert N M Watson FreeBSD Core Team, TrustedBSD Project [EMAIL PROTECTED] NAI Labs, Safeport Network Services On Tue, 2 Apr 2002, Robert Watson wrote: Doesn't top already run in Jail on -CURRENT? Thomas Moestl did this work a while back, exposing the necessary information to support most of our userland monitoring tools using sysctl rather than kvm: last pid: 32655; load averages: 0.05, 0.09, 0.07up 7+14:52:51 09:50:01 2 processes: 1 running, 1 sleeping CPU states: 4.7% user, 0.0% nice, 2.3% system, 1.2% interrupt, 91.8% idle Mem: 61M Active, 21M Inact, 32M Wired, 6932K Cache, 22M Buf, 888K Free Swap: 261M Total, 52M Used, 209M Free, 20% Inuse PID USERNAME PRI NICE SIZERES STATETIME WCPUCPU COMMAND 32652 root 960 1956K 1080K RUN 0:00 0.00% 0.00% top 32650 root 200 1448K 996K pause0:00 0.00% 0.00% tcsh In general, new features for top go into the cross-platform vendor top code, but features to improve FreeBSD-specific information extraction go into our local tree. What exactly does -j do? Robert N M Watson FreeBSD Core Team, TrustedBSD Project [EMAIL PROTECTED] NAI Labs, Safeport Network Services On Mon, 1 Apr 2002, Jon Ringuette wrote: Sorry to bother everyone here but I have a quick question (or I guess what I hope is a quick question). I have made some modifications to src/usr.bin/machine.c to allow TOP to run in a jail (I have mostly just taken out kvm_read's ) and zero'd out alot of information that is not available to TOP in a jail ie . Total memory usage / swap usage / cpu usage etc.. I would like to add an option -j to top and have it check for that option to do this (sort of a really lightweight top if this option is used). Would this be of interest to anymore for me to submit a patch and if so how should I go about adding the -j option should I make a copy of the top.c into src/usr.bin/top or contact the auther of top to see about submitting it to him? I'm not sure if this would be useful to anyone outside of the FreeBSD community is the reason I am a bit iffy about doing that. If someone could point me in the right direction to do this the correct way I would be very grateful, I really want to code but I'm not sure where and how i should do it :) -jon iMeme To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Software Development from Russia ($20-$25 per hour)
Dear IT Manager, Have you ever thought of redesigning your website or creating an on-line database, in short, anything that has to do with software development, this offer is right for you. Our highly skilled off-shore programmers are capable and ready to develop any of your e-commerce software dreams and needs. We develop for ALL WINDOWS AND UNIX PLATFORMS Auctions, Hosting Solutions, Shopping Carts, databases, networks, plus Perl, PHP, C++, ASP, Cold Fusion, Java, Wap, XML, MS Access, SQL, etc. From business analysis and consulting to web design, from coding to testing we provide a full cycle of IT services. Typical rates are 20-25 USD per hour. For more complete information about the company and services provided please visit http://www.smtprogramming.com I will be glad to answer any of your questions ([EMAIL PROTECTED]). Feel free to contact us any time and all the estimates will be done for you FREE of charge. Thanks! Paul PS. It's one time message. You are not on a list. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
dlopen(), ld.so, and library wrappers
Greetings all, I wish to accomplish the following: 1. Program foo loads shared object bar using dlopen() and dlsym() 2. bar needs certain symbols resolved, which foo intercepts. For example, foo might wrap malloc() or open() to provide its own behavior... much like subclassing window procedures on that OS from Redmond, only I'm wrapping library calls instead of window callback procedures. Any suggestions, or should I get busy hacking ld-elf.so? And, yes, I know that one must be very careful when playing with fire. If anyone wishes to tell of monsters or horror stories, I'd appreciate those as well. -- MTIA! Eddy P.S. -- Please CC me. I'm not currently subscribed. Brotsman Dreger, Inc. - EverQuick Internet Division Phone: +1 (316) 794-8922 Wichita/(Inter)national Phone: +1 (785) 865-5885 Lawrence ~ Date: Mon, 21 May 2001 11:23:58 + (GMT) From: A Trap [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Please ignore this portion of my mail signature. These last few lines are a trap for address-harvesting spambots. Do NOT send mail to [EMAIL PROTECTED], or you are likely to be blocked. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
adding allocation failure detection / automatic panic
While working on PR 36504 I noted that there are situations where the system cannot continue if zalloc() fails. Rather then force the caller of zalloc() to check for NULL in these cases, I think it makes sense to add another flag, ZONE_PANICFAIL, allowing a zone to automatically panic if the allocation fails. Normal zone allocations fail only when the system has run out of KVM or the zone has reached its size limit. The proposed patch is shown below. I thought about putting the check in _zget() but I think it is safer to panic() after the mutex is released. I intend to use the flag for the zone we allocate vm object's out of. I'm sure there are other zones that could use it as well. This way we get an obvious panic message rather then a kernel trap / panic. I'm CCing Jeff as I believe it would be beneficial for him to add a similar flag to his UMA code (if he hasn't already), and eventually this stuff will have to translate over anyway. -Matt Index: vm/vm_zone.c === RCS file: /home/ncvs/src/sys/vm/vm_zone.c,v retrieving revision 1.54 diff -u -r1.54 vm_zone.c --- vm/vm_zone.c18 Mar 2002 15:08:09 - 1.54 +++ vm/vm_zone.c2 Apr 2002 18:59:06 - @@ -108,6 +108,8 @@ * sizesize of zone entries. * nentriesnumber of zone entries allocated (only ZONE_INTERRUPT.) * flags ZONE_INTERRUPT -- items can be allocated at interrupt time. + * ZONE_PANICFAIL -- panic on failure (allows caller to + * assume that the zalloc() always succeeds) * zalloc number of pages allocated when memory is needed. * * Note that when using ZONE_INTERRUPT, the size of the zone is limited @@ -482,6 +484,7 @@ item = z-zitems; z-zitems = ((void **) item)[0]; #ifdef INVARIANTS + KASSERT(item == NULL, (zitems unexpectedly NULL)); KASSERT(((void **) item)[1] == ZENTRY_FREE, (item is not free)); ((void **) item)[1] = 0; @@ -492,6 +495,14 @@ out: mtx_unlock(z-zmtx); + + /* +* PANICFAIL allows the caller to assume that the zalloc() will +* always suceed. If it doesn't, we panic here after we release +* the mutex. +*/ + if (item == NULL (z-zflags ZONE_PANICFAIL)) + panic(zalloc(%s) failed, z-zname); return item; } Index: vm/vm_zone.h === RCS file: /home/ncvs/src/sys/vm/vm_zone.h,v retrieving revision 1.20 diff -u -r1.20 vm_zone.h --- vm/vm_zone.h19 Mar 2002 09:11:49 - 1.20 +++ vm/vm_zone.h2 Apr 2002 18:57:18 - @@ -18,8 +18,9 @@ #define _SYS_ZONE_H -#define ZONE_INTERRUPT 1 /* Use this if you need to allocate at int time */ -#define ZONE_BOOT 16/* This is an internal flag used by zbootinit */ +#define ZONE_INTERRUPT 0x0001 /* If you need to allocate at int time */ +#define ZONE_PANICFAIL 0x0002 /* panic if the zalloc fails */ +#define ZONE_BOOT 0x0010 /* Internal flag used by zbootinit */ #include sys/_lock.h #include sys/_mutex.h To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: dlopen(), ld.so, and library wrappers
* E.B. Dreger [EMAIL PROTECTED] [020402 10:29] wrote: Greetings all, I wish to accomplish the following: 1. Program foo loads shared object bar using dlopen() and dlsym() 2. bar needs certain symbols resolved, which foo intercepts. For example, foo might wrap malloc() or open() to provide its own behavior... much like subclassing window procedures on that OS from Redmond, only I'm wrapping library calls instead of window callback procedures. Any suggestions, or should I get busy hacking ld-elf.so? And, yes, I know that one must be very careful when playing with fire. If anyone wishes to tell of monsters or horror stories, I'd appreciate those as well. From the dlopen manpage: If dlsym() is called with the special handle RTLD_NEXT, then the search for the symbol is limited to the shared objects which were loaded after the one issuing the call to dlsym(). Thus, if the function is called from the main program, all the shared libraries are searched. If it is called from a shared library, all subsequent shared libraries are searched. RTLD_NEXT is useful for implementing wrappers around library functions. For example, a wrapper function getpid() could access the ``real'' getpid() with dlsym(RTLD_NEXT, getpid). How does that sound? -- -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 deductible 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: adding allocation failure detection / automatic panic
(note: this kassert is wrong): :+ KASSERT(item == NULL, (zitems unexpectedly NULL)); should be: :+ KASSERT(item != NULL, (zitems unexpectedly NULL)); -Matt To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: dlopen(), ld.so, and library wrappers
Date: Tue, 2 Apr 2002 11:05:52 -0800 From: Alfred Perlstein [EMAIL PROTECTED] From the dlopen manpage: I reread that right before initial post. If dlsym() is called with the special handle RTLD_NEXT, then the search for the symbol is limited to the shared objects which were loaded after the one issuing the call to dlsym(). Thus, if the function is called Am I confused on loading order? I thought that linked libraries were loaded _before_ dlopen() shared objects. from the main program, all the shared libraries are searched. If it is called from a shared library, all subsequent shared libraries are searched. RTLD_NEXT is useful for implementing wrappers around library functions. For example, a wrapper function getpid() could access the ``real'' getpid() with dlsym(RTLD_NEXT, getpid). How does that sound? So you're saying that: 1) Program foo contains function called getpid() 2) Program foo links with libc 3) foo.getpid uses dlsym(RTLD_NEXT, getpid) to call libc.getpid 4) Shared object bar, loaded by foo, will receive a pointer to foo.getpid instead of libc.getpid when getpid is resolved. ??? If that'll work, great. But I didn't interpret the manpage that way. I read it as shared object bar being able to provide a wrapper for program foo, which is the _opposite_ of what I want. I'll try the above. If that doesn't do what I want, I'll see if I can restate more clearly. -- Eddy Brotsman Dreger, Inc. - EverQuick Internet Division Phone: +1 (316) 794-8922 Wichita/(Inter)national Phone: +1 (785) 865-5885 Lawrence ~ Date: Mon, 21 May 2001 11:23:58 + (GMT) From: A Trap [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Please ignore this portion of my mail signature. These last few lines are a trap for address-harvesting spambots. Do NOT send mail to [EMAIL PROTECTED], or you are likely to be blocked. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
TXT ------------ The GM.DLS file contains.
S. The Roland SoundCanvas Sound Set is licensed under Microsoft's End User License Agreement for use with Microsoft operating system products only. All other uses require a separate written license from Roland. Sound.com Description: Binary data GMREADME.TXT Description: Binary data
Re: dlopen(), ld.so, and library wrappers
Date: Tue, 2 Apr 2002 11:05:52 -0800 From: Alfred Perlstein [EMAIL PROTECTED] From the dlopen manpage: [ snip ] Works great, less coding. Looks like I just misunderstood the manpage and/or the workings of the dynamic linker. Time for me to have some fun. And, no, I'm not using wrappers for security... that would be silly. -- Thanks! Eddy Brotsman Dreger, Inc. - EverQuick Internet Division Phone: +1 (316) 794-8922 Wichita/(Inter)national Phone: +1 (785) 865-5885 Lawrence ~ Date: Mon, 21 May 2001 11:23:58 + (GMT) From: A Trap [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Please ignore this portion of my mail signature. These last few lines are a trap for address-harvesting spambots. Do NOT send mail to [EMAIL PROTECTED], or you are likely to be blocked. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Question about possibly additions to TOP
PID USERNAME PRI NICE SIZERES STATETIME WCPUCPU COMMAND 32652 root 960 1956K 1080K RUN 0:00 0.00% 0.00% top 32650 root 200 1448K 996K pause0:00 0.00% 0.00% tcsh In general, new features for top go into the cross-platform vendor top code, but features to improve FreeBSD-specific information extraction go into our local tree. What exactly does -j do? Thank you for your information I was not actually aware that it was fixed in 5.0 . I went ahead and at the advise of Alfred Perlstein made it into a patch for just machine.c that will allow the 4.5 branch of top just fail out of kvm calls more gracefully and thus allowing it to run in a jailed environment or really any environment where it can not get all of its needed information. I don't really want to clutter up everyones mailbox with sending another patch but I have throw in on web page if you can to take a look http://peoplearestrange.net/jon/machine.c.diff -jon iMeme To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: TXT ------------ The GM.DLS file contains.
hmmm looks like Jean-Luc has the Magistr-B virus to me.. (I have not analysed it but it seems like it by visual inspection..) You can get further information on this virus from: http://www.antivirus.com/vinfo/virusencyclo/default5.asp?VName=PE_MAGISTR.A and http://www.antivirus.com/vinfo/virusencyclo/default5.asp?VName=PE_MAGISTR.B and: a better reference: http://www3.ca.com/solutions/collateral.asp?CT=65ID=1134 http://www3.ca.com/virus/ ( and select Win32.Magistr.29188 ) this virus has been making the rounds.. On Tue, 2 Apr 2002, De Brabandere Jean-Luc wrote: S. The Roland SoundCanvas Sound Set is licensed under Microsoft's End User License Agreement for use with Microsoft operating system products only. All other uses require a separate written license from Roland. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
mpsafe malloc
Started looking at making malloc mpsafe. First issue I came across was this brokenish code in uma_core.c:page_alloc(): if (lockstatus(kernel_map-lock, NULL)) { *pflag = UMA_SLAB_KMEM; p = (void *) kmem_malloc(kmem_map, bytes, wait); } else { *pflag = UMA_SLAB_KMAP; p = (void *) kmem_alloc(kernel_map, bytes); } using lockstatus won't work for smp. I think a solution is to do a trylock on the kmem_map, then have kmem_malloc either recurse on the lock, or take a flag to tell it not to bother locking. ? -- -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 deductible 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: mpsafe malloc
Well, if UMA is going to eventually remove kmem_map and just use kernel_map (or vise-versa), then the issue comes down to why kernel_map-lock is lockmgr lock in the first place, instead of a mutex. I think the reason is historical. Basically kernel_map was originally a struct vm_map just like the vm_map's used everywhere else in the system. But then all sorts of problems cropped up and it had to be special cased... but what REALLY should have happened is that we should have stopped using the stupid struct lock for kernel_map. Perhaps for the case of kernel_map and only kernel_map, the 'lock' field should be ignored entirely (1) and a kernel_map_mtx (a global mutex) be used instead. Then we don't have to screw around with it at all, we would not have to worry about 'blocking' situations in the sturct lock sense, only in the mtx_lock() sense. Am I making any sense here? - note (1): In fact, the kernel_map-lock should be initialized such that the system panics if anyone tries to play with it. -Matt :Started looking at making malloc mpsafe. : :First issue I came across was this brokenish code in :uma_core.c:page_alloc(): : :if (lockstatus(kernel_map-lock, NULL)) { :*pflag = UMA_SLAB_KMEM; :p = (void *) kmem_malloc(kmem_map, bytes, wait); :} else { :*pflag = UMA_SLAB_KMAP; :p = (void *) kmem_alloc(kernel_map, bytes); :} : :using lockstatus won't work for smp. : :I think a solution is to do a trylock on the kmem_map, then have :kmem_malloc either recurse on the lock, or take a flag to tell it :not to bother locking. : :? :-- :-Alfred Perlstein [[EMAIL PROTECTED]] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: lang/icc doesn't compile c++ sources
Alexander Leidinger wrote: test.cc, line 4: error: name followed by :: must be a class or namespace name std::string test =Hello World; ^ So we have to fix the base system headers in this regard and discard Intels C++ headers? This appears to be an attempt to declare an instance of an internal subclass. Probably needs the code fixed. What about these errors? ---snip--- test.cc: /usr/include/g++/std/bastring.h, line 142: error: too few arguments for class template reverse_iterator typedef ::reverse_iteratoriterator reverse_iterator; ^ /usr/include/g++/std/bastring.h, line 143: error: too few arguments for class template reverse_iterator typedef ::reverse_iteratorconst_iterator const_reverse_iterator; ---snip--- These are compiler errors. Try puting spaces in between the tokens. Specifically, after the :: and around the . It's been a while since I've seen code written with this style, so I can't give you the magic incantation off the top of my head. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: I think Linus wins the April 1st competition this year
It seems to be a fake: looks like it was not from Linus Proper :) They were doing some forensics on the headers and came to a preliminary conclusion it was sent from Kremlin. --- Robert Watson [EMAIL PROTECTED] wrote: Wow. I'm impressed. Linus is too bored if he has time to come up with these things. He should write a new OS or something. Perhaps he could join the LainOS team :-). Robert N M Watson FreeBSD Core Team, TrustedBSD Project [EMAIL PROTECTED] NAI Labs, Safeport Network Services On Mon, 1 Apr 2002, Jordan Hubbard wrote: http://www.cs.helsinki.fi/linux/linux-kernel/2002-13/0063.html Matt or Theo indeed! - Jordan To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
need to dump process stack frames from core
Hello, I have a core file (kernel) and want to dump the stack frames of a process (assuming it was still in memory) given the pid. Is there a way I can do this? thanks, Rohit. _ http://www.gojuryu.com . What Karate Do was meant to be. _ Run a small business? Then you need professional email like [EMAIL PROTECTED] from Everyone.net http://www.everyone.net?tag To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: dlopen(), ld.so, and library wrappers
E.B. Dreger wrote: So you're saying that: 1) Program foo contains function called getpid() 2) Program foo links with libc 3) foo.getpid uses dlsym(RTLD_NEXT, getpid) to call libc.getpid 4) Shared object bar, loaded by foo, will receive a pointer to foo.getpid instead of libc.getpid when getpid is resolved. ??? If that'll work, great. But I didn't interpret the manpage that way. I read it as shared object bar being able to provide a wrapper for program foo, which is the _opposite_ of what I want. I'll try the above. If that doesn't do what I want, I'll see if I can restate more clearly. I recently wanted to do what you want to do, which is to write a program that could load shared object modules, and have the external symbol references of the modules resolve to symbols defined in the program. Your example case is more complicated, in that it wants the symbols in the program to have duplicates in libc.so, and to resolve the symbols preferentially to the ones defined in the program. The answer is: it works as expected. Alfred's point about inferior nodes is actually not quite correct, in practive. In practice, if I have an arbitrary load order for modules, things can be undefined. Specifically: main: #include sys/syscall.h #include sys/types.h #include unistd.h #include stdio.h pid_t getpid( void) { printf( main getpid\n); return syscall( SYS_getpid); } main() { /* load modules fee and foo in any order */ ... foomain(); } ... foo.so: foomain() { printf( pid is %d\n, getpid()); } ... fee.so: #include sys/syscall.h #include sys/types.h #include unistd.h #include stdio.h pid_t getpid(void) { printf( fee getpid\n); return syscall(SYS_getpid); } ... Which one foomain() ends up calling depends on whether fee.so was loaded before or after foo.so was loaded. The other PITA here is that when you are linking, you can't know that all your symbols are resolved, and that you haven't forgotten a shared library on the linkage line, because the linking of shared objects doesn't treat them as RTLD_NOW at ld invocation time. This is arguably a linker bug, since it's not reporting missing symbols at link time. You can recreate this without shared objects that you are going to dlopen, simply by creating a shared library that references symbols in a second shared library (no static data references!), and then using routines in the first library in your main. The linker won't bitch (but should!) when you link your program only against the first library. Instead, it crashes at runtime when it does RTLD_LAZY ecaluation of shared library symbols... and they aren't there (which would be OK, if the initial linktime treated symbol graph resolution as RTLD_NOW; this would take about 350 lines of code in ld.so, the lat time I looked). Also, you can't intentionally override functions in shared library referenced from main() with symbols in a shared object, without doing explicit work to to the override. Also, the dlopen( NULL, mode); doesn't work the way you would expect (or want) with the RTLD_GLOBAL and RTLD_LAZY flags. A common way of addressing ordering issues is to derference your function pointers out of a struct of function pointers, which you obtain by asking a module entry point for the function pointers. In Microsoft-land, this is called an interface, but an interface is just a pure virtual base class with a default protection type of public, so you can just #define interface struct, and be there. Basically, the module passes back a pointer to an implementation class for the pure virtual base class (this entry point in Microsoft-land is called IUnknown; it's a basic extension to the OLE mechanism, which defines some additional well known entry points, and which is a subset of COM, which defines entry points like process attach/detach and thread attach/detach). Actually, FreeBSD could use some of these, particularly for dealing with threading on things like the UMICH and Netscape LDAP libraries, which are not intrinsically thread-safe (the thread-attach/detach permits you to insert a serialization barrier that you would not otherwise be able to get). You can simulate the process attach/detach pretty easily in FreeBSD, by adding entries to the shared object's CTOR and DTOR linker set lists, which are processed out of .init and .fini to ensure construction/destruction of
usb storage class / umass.c
i am having trouble with a storage class USB device. the device is a Olympus C-1/D-150 camera with a SmartMedia disk and a USB link. i have tried changing OLYMPUS to Olympus in the kernel source and various other things, but have had no success mounting the SmartMedia disk. from everything i understand and have read, there shouldn't be any problem in connecting/accessing this device. i was referred to the hackers list for help - and would be happy to do whatever i can to get this thing to work. please reply off the list! Outer Connectors: USB interface (storage class) Auto-connect USB: Yes $ usbdevs addr 1: OHCI root hub, OPTi addr 2: C-1 Digital Camera, Olympus $ dmesg ohci0: OPTi 82C861 (FireLink) USB controller mem 0xe100-0xe1000fff irq 10 at device 19.0 on pci0 usb0: OHCI version 1.0, legacy support usb0: OPTi 82C861 (FireLink) USB controller on ohci0 usb0: USB revision 1.0 uhub0: OPTi OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered umass0: OLYMPUS C-1Z,D-150Z, rev 1.10/10.15, addr 2, SCSI over Bulk-Only umass0: Max Lun is 0 umass-sim:0:-1:-1:XPT_PATH_INQ:. umass0:0:0:-1: Attached to scbus0 as device 0 umass0: Attach finished orm0: Option ROM at iomem 0xc-0xc7fff on isa0 ... umass-sim:0:-1:-1:XPT_PATH_INQ:. umass-sim:0:-1:-1:XPT_PATH_INQ:. umass-sim:0:-1:-1:XPT_PATH_INQ:. umass0:0:0:0:XPT_PATH_INQ:. umass0:0:0:0:XPT_PATH_INQ:. umass0:0:0:0:XPT_SCSI_IO: cmd: 0x12, flags: 0x40, 6b cmd/36b data/18b sense umass0: CBW 1: cmd = 6b (0x12002400), data = 36 bytes, dir = in umass-sim:0:1:0:func_code 0x0004: Invalid target (no wildcard) umass-sim:0:2:0:func_code 0x0004: Invalid target (no wildcard) umass0: Handling BBB state 1 (BBB CBW), xfer=0xc07f1300, TIMEOUT umass0: failed to send CBW umass0: Bulk Reset umass0: Handling BBB state 7 (BBB Reset), xfer=0xc07f7d80, TIMEOUT umass0: BBB reset failed, TIMEOUT umass0: Clear endpoint 0x82 stall umass0: Handling BBB state 8 (BBB bulk-in clear stall), xfer=0xc07f7d00, TIMEOUT umass0: BBB bulk-in clear stall failed, TIMEOUT _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: procfs development
* Alton, Matthew [EMAIL PROTECTED] [020402 16:18] wrote: I managed to glean from sys/procfs.h that the FreeBSD implementation is basically a barebones interface that is only there for gdb to work with. So has there been any talk of making the ctl file take command/operands structs as input, and/or the status file offer elaborate structures as output, or an lwp directory, etc? Not really, if someone where to present a patchset and documentation then it would likely be integrated. -- -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 deductible 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: lang/icc doesn't compile c++ sources
On Tue, 02 Apr 2002 15:22:32 -0800 Terry Lambert [EMAIL PROTECTED] wrote: Alexander Leidinger wrote: test.cc, line 4: error: name followed by :: must be a class or namespace name std::string test =Hello World; ^ So we have to fix the base system headers in this regard and discard Intels C++ headers? This appears to be an attempt to declare an instance of an internal subclass. Probably needs the code fixed. i think this because the gcc 2.95.3 headers don't use namespaces correctly. so std:: is unknown :( What about these errors? ---snip--- test.cc: /usr/include/g++/std/bastring.h, line 142: error: too few arguments for class template reverse_iterator typedef ::reverse_iteratoriterator reverse_iterator; ^ /usr/include/g++/std/bastring.h, line 143: error: too few arguments for class template reverse_iterator typedef ::reverse_iteratorconst_iterator const_reverse_iterator; ---snip--- These are compiler errors. Try puting spaces in between the tokens. Specifically, after the :: and around the . It's been a while since I've seen code written with this style, so I can't give you the magic incantation off the top of my head. the headers don't define reverse_iterator the way it is expected by bastring.h; have a look at interator and you will see. i've fixed this problem but then other (namespace related) problems arise: bastring.h uses ::reverse_iterator (as you can see ;]) but these really should be std::reverse_iterator... cheerz simon -- /\ http://corecode.ath.cx/#donate \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News msg33278/pgp0.pgp Description: PGP signature
Re: procfs development
In message E1450DFD283DD6118492A5F0032356BD7C@STLABCEXG024, Alton, Matth ew writes: Are there any plans to expand the procfs implementation to provide an interface that is more in line with the implementations on Unixware, Solaris and AIX? I've been writing a simple debugger that would be portable among those three platforms, and others, but it is based completely on the procfs interface, and I've come to find out the procfs implementation on FreeBSD and Linux are (aside from being completely different from each other) completely different than what's been done on AIX, Solaris and Unixware. We are working very hard to make procfs optional in FreeBSD for a number of reasons. -- 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
Daily Joke
There was a Japanese man who went to America for sightseeing. On the last day, he hailed a cab and told the driver to drive to the airport. During the journey, a Honda drove past the taxi. Thereupon, the man leaned out of the window excitedly and yelled, Honda, very fast! Made in Japan! After a while, a Toyota sped past the taxi. Again, the Japanese man leaned out of the window and yelled, Toyota, very fast! Made in Japan! And then a Mitsubishi sped past the taxi. For the third time, the Japanese leaned out of the window and yelled, Mitsubishi, very fast! Made in Japan! The driver was a little angry, but he kept quiet. And this went on for quite a number of cars. Finally, the taxi came to the airport. The fare was US$300. The Japanese exclaimed, Wah... so expensive! There upon, the driver yelled back, Meter, very fast! Made in Japan! This is the special delivery of Tubegator.com's daily joke. http://tubegator.com/jokeoftheday.shtml Idcode for this ([EMAIL PROTECTED]) emailaddress is: fpgK4pYMgRH.g To unsubscribe you can click on this link: http://tubegator.com/motor/mailsignup.cgi?unsub=Semail=hackers%40FreeBSD.orgid_code=fpgK4pYMgRH.g Or use the form on the webpage. Do you think this joke is good or bad, you can give it your rating on the webpage. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message