Linux-Development-Sys Digest #750, Volume #7 Fri, 7 Apr 00 14:13:22 EDT
Contents:
RH Linux MQseries Client to server ("qsun")
kernel space! (vinod tipparaju)
error confinement ("Pankaj Ratan Lal")
IBM Etherjet 10/100 Cardbus PCMCIA Card ("Peter Muangxong")
Stack SIGSEGV (Henning)
Re: how do you do to force to unload a module (Joe Pfeiffer)
Re: To core or not to core - Part 2 ("Mark Langsdorf")
Re: kernel space! (Juergen Hannappel)
Re: Testing folder on ftp.kernel.org (Paul Kimoto)
Re: System.map location (Paul Kimoto)
Re: To core or not to core - Part 2 (Chuck Dillon)
Re: error confinement (Joe Pfeiffer)
Re: how do you do to force to unload a module (Kaz Kylheku)
Re: PCI configuration space fun. (Grant Edwards)
Q: What (free) debuggers are available w/memory leak testing (david a. lethe)
Re: pthread help!!! (Kaz Kylheku)
Re: How compatible is Linux with .. Linux ("The Wogster")
----------------------------------------------------------------------------
From: "qsun" <[EMAIL PROTECTED]>
Subject: RH Linux MQseries Client to server
Date: Thu, 6 Apr 2000 17:05:23 -0400
I test MQseries under redhat linux client to server connection.
when I issue 'runmqlsr -m venus.queue.manager -t TCP -n 9999&',
system think a syntax error.
Even I sometime the runmqlsr run well at server side, the amqsput
application can not run at client side due to MQCONN error.
Anybody help me ?
Thank you
------------------------------
From: vinod tipparaju <[EMAIL PROTECTED]>
Subject: kernel space!
Date: Fri, 07 Apr 2000 10:06:57 -0400
Hi
This is my problem...
I needed to allocate some memory in kernel space, and also in i/o
space..and then do two things with it.
1)copy the memory from kernal space to i/o space...
2) map memory in kernal space to memory in user space...
as I have very little(littler that little) knowledge of unix based
kernels....the way I thought Id do this was...
for mem allcation in kernal space...
use the normal malloc....but run the program in kernal space.....(as a
daemon....i suppose)
I still dont know how to allocate mem in i/o space....
thankx a lot!
vinod
------------------------------
From: "Pankaj Ratan Lal" <[EMAIL PROTECTED]>
Subject: error confinement
Date: Fri, 7 Apr 2000 20:17:00 +0530
Hi All,
I am doing a project on error confinement in the context of loadable modules
in linux. Maurice bach is what I have for Unix, but I am unable to find any
such thing for linux. Can somebody help me on this, by providing me info
'bout any book on linux internals and may be coming close to this topic.Are
there any web links which I can get. The lkg download from sunsite seems to
be too general. If there is nothing on this which parts of the kernel source
should I look at.
Any help will be greatly appreciated.
Thanks All,
Pankaj Ratan Lal
------------------------------
From: "Peter Muangxong" <[EMAIL PROTECTED]>
Subject: IBM Etherjet 10/100 Cardbus PCMCIA Card
Date: Fri, 7 Apr 2000 09:50:50 -0500
Anyone get this card to work in linux? I had kinda working for a bit. The
card gets a link from it to the hub. But that's about it. Not too sure
whether it's working or just toying with me. :-)
Any ideas would greatly be appreciated.
------------------------------
From: Henning <[EMAIL PROTECTED]>
Subject: Stack SIGSEGV
Date: Fri, 07 Apr 2000 16:56:33 +0200
Hy folks,
I'm writing a sort of RPC-Server based on a propriatary protocol.
I have a process that loads shared libraries and executes a function.
I have a signalhandler to catch nearly all sorts of SEH-exceptions for
development and log reasons.
Now I want to be sure that no stack overflow can appear.
I use
==================snip==================
getrlimit(RLIMIT_STACK, &orlim);
rlim = orlim;
rlim.rlim_cur = some_small_value_for_testing;
setrlimit(RLIMIT_STACK, &rlim);
call_the_function();
setrlimit(RLIMIT_STACK, &orlim);
==================snap==================
to reduce the stack amount the function can use.
In my testalgorithm I call
==================snip==================
long throwstack(char* pcIn, unsigned short usLenIn,
char** ppcOut, unsigned short* pusLenOut)
{
loop();
return 0;
}
static void loop(void)
{
char szSpace[255];
memset(szSpace, 0, sizeof(szSpace));
loop();
}
==================snap==================
So my problem is, that no signal handler is called when the stack is
empty.
How can I manage to catch the signal, unset the limit in signal handler
and continue my server as usual?
Does anyone has an idea?
------------------------------
From: Joe Pfeiffer <[EMAIL PROTECTED]>
Subject: Re: how do you do to force to unload a module
Date: 07 Apr 2000 08:45:56 -0600
philippe Defert <[EMAIL PROTECTED]> writes:
> when i do rmod name_module, the system respond:
> device or ressource are busy
>
> but i want unload this module
> how can i do?
Find out why it's busy, make it free, and rmmod it.
--
Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605
Department of Computer Science FAX -- (505) 646-1002
New Mexico State University http://www.cs.nmsu.edu/~pfeiffer
VL 2000 Homepage: http://www.cs.orst.edu/~burnett/vl2000/
------------------------------
From: "Mark Langsdorf" <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c,comp.unix.solaris,comp.unix.questions,comp.unix.programmer
Subject: Re: To core or not to core - Part 2
Date: Fri, 7 Apr 2000 10:23:08 -0500
Chuck Dillon wrote in message <[EMAIL PROTECTED]>...
>
>
>Mark Langsdorf wrote:
>>
>> ...
>>
>> Why aren't you checking pointer values that are being passed to
>> you? Bad coding practice.
>
>Not necessarily. I agree that use of some asserts while debugging
>would be appropriate but for production code I don't agree that all
>functions passed pointers should use CPU time to verify that the
>calling code was properly designed and debugged. If you accept
>that then you must also accept the notion that ALL arguments should
>be validated by all functions at all levels at all times. You would
>also have to write wrappers ot check the arguments to all the
>system/library functions that don't follow this practice. That's a
>lot of wasted cycles to compensate for inadequate testing.
Oh, I agree that in production code, you need to decide at what
level you will perform checks for things like null pointers, and
remove the unnecessary checks - if they only way to call a function
is an if statement that guarantees the pointer is valid, then a pointer
check in the function is redundant.
In development code, I'd go for the redundancy, just for the safety
it provides. Then strip out all the redundancy in production.
-Mark Langsdorf
------------------------------
From: Juergen Hannappel <[EMAIL PROTECTED]>
Subject: Re: kernel space!
Date: 07 Apr 2000 17:35:36 +0200
vinod tipparaju <[EMAIL PROTECTED]> writes:
> Hi
> This is my problem...
> I needed to allocate some memory in kernel space, and also in i/o
> space..and then do two things with it.
You *cannot* allocate memory in IO space because IO space
is for IO only and not for memory. It can be accessed only with IO
instructions (inb() outb()) and not with the normal memory stuff.
> 1)copy the memory from kernal space to i/o space...
> 2) map memory in kernal space to memory in user space...
>
>
> as I have very little(littler that little) knowledge of unix based
> kernels....the way I thought Id do this was...
>
> for mem allcation in kernal space...
>
> use the normal malloc....but run the program in kernal space.....(as a
> daemon....i suppose)
>
> I still dont know how to allocate mem in i/o space....
>
> thankx a lot!
> vinod
>
--
Dr. Juergen Hannappel Office: W148 Phone: +49 228 73 2447 FAX +49 228 73 7869
mailto:[EMAIL PROTECTED] Physikalisches Institut der Uni Bonn
http://lisa2.physik.uni-bonn.de/~hannappe Nussallee 12, D-53115 Bonn, Germany
CERN: Phone: +412276 76461 Fax: 77930 Bat. 892-R-A13 F-01631 CERN CEDEX, France
------------------------------
From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: Testing folder on ftp.kernel.org
Date: 7 Apr 2000 12:02:23 -0500
Reply-To: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>, Ajith wrote:
> I wanted to know more about the contents of the testing folder under
> pub/linux/kernel/testing/ on the kernel.org server. I have downloaded the
> bzip utility. I extracted one of the files, pre2-1.bz2 also. My request is
> to get more information on what these files test and how they are used. Is
> there an FTP server that supports anonymous FTP to this folder?
This is where you can find Linus Torvalds's test patches. Ones that work
out find their way into the (next) patch-2.3.99-pre* (or whichever number
is appropriate). Patches need to be decompressed by gzip(1) or bzip2(1),
as appropriate, and applied to the previous source-code version with
patch(1). The patch you have is the first test patch for 2.3.99-pre2. It
is out of date, since the last kernel version is either 2.3.99-pre3 or
2.3.99-pre4-4, depending on how you look at it.
You can get these patches through ftp at
ftp.XX.kernel.org/pub/linux/kernel/testing, where XX denotes your country
code (e.g., "us").
--
Paul Kimoto <[EMAIL PROTECTED]>
------------------------------
From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: System.map location
Date: 7 Apr 2000 12:09:23 -0500
Reply-To: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>, D. Stimits wrote:
> it would make sense if they all stopped
> putting in search code, and let the kernel specify which map file to
> use...perhaps allowing a list of paths, which by default, use
> something like the current klogd search if the user compile didn't
> override it. They'd all ask the kernel which System.map to use, and if
> you had 5 kernels in 5 directories, each would know where to look
> without uname -r differences.
The kernel is not interested in the System.map file. (It has /proc/ksyms,
however ...). Proposals to incorporate the System.map into the kernel
itself have been rejected in the past.
--
Paul Kimoto <[EMAIL PROTECTED]>
------------------------------
From: Chuck Dillon <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c,comp.unix.solaris,comp.unix.questions,comp.unix.programmer
Subject: Re: To core or not to core - Part 2
Date: Fri, 07 Apr 2000 11:13:01 -0500
Mark Langsdorf wrote:
>
> ...
>
> In development code, I'd go for the redundancy, just for the safety
> it provides. Then strip out all the redundancy in production.
>
> -Mark Langsdorf
Thanks for the clarification. But I think it's important we be clear
here since the range of experience of readers is vast in the group.
I have a problem with your use of 'safety' here. It implies to me
that the called function should be more tolerant of such errors
passed from above during development.
IMHO it should be the opposite. The called function should be
as deterministically and repeatable non-tolerant as reasonable
so as to shine a bright light on any errors passed from above.
This is generally done with asserts (man assert) that are
conditionally compiled into the code and so can be 'stripped'
simply by removing/changing a symbol.
-- ced
--
Chuck Dillon
Senior Software Engineer
Genetics Computer Group, a subsidiary of Oxford Molecular
------------------------------
From: Joe Pfeiffer <[EMAIL PROTECTED]>
Subject: Re: error confinement
Date: 07 Apr 2000 09:47:30 -0600
"Pankaj Ratan Lal" <[EMAIL PROTECTED]> writes:
>
>
> I am doing a project on error confinement in the context of loadable modules
> in linux. Maurice bach is what I have for Unix, but I am unable to find any
> such thing for linux. Can somebody help me on this, by providing me info
> 'bout any book on linux internals and may be coming close to this topic.Are
> there any web links which I can get. The lkg download from sunsite seems to
> be too general. If there is nothing on this which parts of the kernel source
> should I look at.
Rubini's book on Linux device drivers has a lot of good information on
kernel modules.
--
Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605
Department of Computer Science FAX -- (505) 646-1002
New Mexico State University http://www.cs.nmsu.edu/~pfeiffer
VL 2000 Homepage: http://www.cs.orst.edu/~burnett/vl2000/
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: how do you do to force to unload a module
Reply-To: [EMAIL PROTECTED]
Date: Fri, 07 Apr 2000 16:16:28 GMT
On Fri, 07 Apr 2000 13:12:08 +0200, philippe Defert
<[EMAIL PROTECTED]> wrote:
>when i do rmod name_module, the system respond:
>device or ressource are busy
>
>but i want unload this module
>how can i do?
Pull the plug on the computer; that should have about the same net effect on
your system as forcibly unloading some code that is in use, and it requires
fewer keystrokes.
--
#exclude <windows.h>
------------------------------
From: grant@nowhere. (Grant Edwards)
Subject: Re: PCI configuration space fun.
Date: Fri, 07 Apr 2000 17:14:26 GMT
In article <8cjan7$3i3$[EMAIL PROTECTED]>, Bill Waddington wrote:
>In article <[EMAIL PROTECTED]>,
>
>> The other question that arises is: is there a simple way to
>> mmap() a block of I/O space? I've done if for PCI _memory_
>> blocks, but doing it for a block of I/O space always sounded
>> difficult. (I think use of I/O space by PCI boards should be
>> deprecated anyway. Just put it all into memory space, life's
>> easier for us software types.)
>
>Correct me if I'm wrong (believe me, I'm used to it), but don't
>the x86 processors use separate, explicit instructions to
>access I/O space?
Yup. You're right.
>If so, it doesn't seem possible to mmap an I/O address.
Not at first, it doesn't.
But, let's say when the user requested to mmap a block of I/O
addresses, you map them to a page that isn't present or has its
protection set so that it will generat a page-fault on any
user-access.
The routine you use to handle the page-fault can examine the
user stack, look to see what the access was, actually do the
corresponding I/O, (and if it was a read access, put the data
into the user context), and resume the user task after the
offending instruction, which has been simulated.
Whether this is at all feasable on the Intel architecture with
the Linux VM setup, I don't know. Even if it is possible, I'm
not claiming it's a worthwile thing to do. ;)
--
Grant Edwards grante Yow! I just remembered
at something about a TOAD!
visi.com
------------------------------
From: [EMAIL PROTECTED] (david a. lethe)
Subject: Q: What (free) debuggers are available w/memory leak testing
Date: Fri, 07 Apr 2000 17:16:13 GMT
Reply-To: [EMAIL PROTECTED]
Are there any freeware linux debuggers out there that have the
capability to test for memory leaks & reading uninitialized variables?
(If there is a low-cost commercial one, then that would be fine too)
Thanks
David
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: linux.dev.c-programming
Subject: Re: pthread help!!!
Reply-To: [EMAIL PROTECTED]
Date: Fri, 07 Apr 2000 17:54:00 GMT
On Mon, 03 Apr 2000 14:28:50 GMT, Kaz Kylheku <[EMAIL PROTECTED]> wrote:
>On Mon, 03 Apr 2000 04:52:40 GMT, Michael A Uman <[EMAIL PROTECTED]>
>wrote:
>>Hello,
>>
>>Does anyone know if there is a way to spawn a thread which is
>>'suspended' in the sense that Win32 has Suspended threads which can be
>>resumed? I am trying to port a library which is currently supported on
>>Win32 and Macintosh.
>
>The POSIX interface doesn't have this feature, and there is currently no
>LinuxThreads extension to provide this.
>
>It means that you have to hack it yourself by using a thread-specific
>flag and condition variable, or a semaphore.
>
>In principle, the POSIX thread interface allows for a hack involving signals:
>e.g. create the thread with some signal (like SIGCONT) block and then have it
>execute sigwait() to atomically unblock the signal and wait for it. The thread
>which created it can then use pthread_kill to wake it up. However,
>this won't work in LinuxThreads because the passing of the signal mask
>from creator to new thread is not atomic.
I did some more digging into this and it's wrong; there is no such bug. (What
happens when a new thread is created is that it inherits the thread manager's
signal mask, which has all signals blocked (except the cancellation signal and
SIGTRAP). Thus although the passing of the signal mask to the new thread is not
atomic, it's not a problem because the signals are initially blocked.)
So the trick will work; you can start threads in a suspended state if
you create them with a blocked signal and have them sigsuspend() on it.
The following example should illustrate that. Error checking omitted
for brevity:
#include <pthread.h>
#include <signal.h>
#define RESUME_SIGNAL SIGALRM /* for instance */
void *suspended_thread(void *arg)
{
sigset_t mask;
int sig;
/* reliably for resume signal */
sigemptyset(&mask);
sigaddset(&mask, RESUME_SIGNAL);
sigwait(&mask, &sig);
/* done waiting */
return 0;
}
int main(void)
{
pthread_t new_thread;
sigset_t block;
/* block resume signal so new thread inherits it blocked */
sigemptyset(&block);
sigaddset(&block, RESUME_SIGNAL);
pthread_sigmask(SIG_BLOCK, &block, NULL);
pthread_create(&new_thread, 0, suspended_thread, 0);
/* deliver resume signal */
pthread_kill(new_thread, RESUME_SIGNAL);
/* wait for termination */
pthread_join(new_thread, 0);
return 0;
}
--
#exclude <windows.h>
------------------------------
From: "The Wogster" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: How compatible is Linux with .. Linux
Date: Fri, 7 Apr 2000 14:04:09 -0400
Peter T. Breuer wrote in message <8ccqgp$eg2$[EMAIL PROTECTED]>...
>In comp.os.linux.development.system The Wogster <[EMAIL PROTECTED]>
wrote:
>
>
>: VMS, HPUX, AIX, Irix, MVS, VSE or other environment. Heck, three years
>: ago, I could have asked the same question!
>
>OK, what IS the difference between VMS and MVS, then! Apart from the
>first letter (of their manufacturer).
>
Gee now maybe a number of people can berate you on not knowing the
difference between a mini and big iron.....
VMS: OS used by Digital Equipment Corporation on it's VAX series of
computers, these are classed as mini computers, very similar to Unix in many
ways, really different in other ways. Best feature, smooth scrolling on
text based terminals no less. Could be crashed by 45 College students
starting a COBOL compile at the same time.
MVS: OS used by International Business Machines on their biggest iron, the
only similarity to Unix is the fact that it runs multiple users and multiple
tasks at the same time. Best feature, you can actually run MVS as an
application under MVS (VM the other IBM Big Iron OS also has this feature).
MVS (and VM) are almost totally crash proof I used to work with these
systems, and running for many months is common.
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************