Linux-Development-Sys Digest #81, Volume #8 Wed, 16 Aug 00 12:13:15 EDT
Contents:
Re: Kernel 2.4.0-test6!!!!! Anyone have any Problems? ("Ross Crawford")
Re: all threads in a process share the same pid? (Hammer)
Re: Kernel 2.4.0-test6 Compile and install module problem? ("E-mu")
Re: Submillisecond timing (Villy Kruse)
Re: kernel uncompression (Josef Moellers)
Re: kernel compiling for sparc64 under sparc32 (Daniel Goergen)
kernel compiling for sparc64 under i386 (Daniel Goergen)
Re: PPPoE (Stephan Kleinowski)
Re: intercepting open/read/close calls (Bernhard Mogens Ege)
Unresolved symbols.- __kfree_skb ("Ram�n Ag�ero")
Re: Submillisecond timing (Bryan Hackney)
Re: Adding a system call dynamically (Kasper Dupont)
Re: doing mmap() twice on the same fd (Kasper Dupont)
Re: Loading a driver during installation (Kasper Dupont)
Re: set_fs, PTR_ERR, sh_bang (Kasper Dupont)
Re: Submillisecond timing (Kasper Dupont)
Re: set_fs, PTR_ERR, sh_bang (Alexander Viro)
Testing multi-processor code (Bhavin Shah)
Re: Remote Boot Pxe toolkit (Anes Lihovac)
Problem to load a kernel module (Mace =?iso-8859-1?Q?Ga=EBl?=)
----------------------------------------------------------------------------
From: "Ross Crawford" <[EMAIL PROTECTED]>
Subject: Re: Kernel 2.4.0-test6!!!!! Anyone have any Problems?
Date: Wed, 16 Aug 2000 12:50:51 +1000
The implication is that you're unlikely to get many useful responses if you
put so many !'s in your subject, 'cos the people who may provide useful info
will probably never read the post.
Regards,
ROSCO
NOTE: Yes, I read the (original) post. No, I don't have any useful response.
"E-mu" <[EMAIL PROTECTED]> wrote in message
news:8nd0ue$[EMAIL PROTECTED]...
>
> "Jynx" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > On 15 Aug 2000 22:06:13 GMT, Emu posted:
> > Subject: Re: Kernel 2.4.0-test6!!!!!.....
> >
> > You need to understand that most experienced ng users (who I expect
> > you'd like to engage with your problem) use killfile filters that
> > plonk Subject:'s with 2 or more exclamation marks.
> >
> > Because I am _testing_ my killfile just now, that's why.....
>
>
> Sorry , what are you saying my friend?
>
>
------------------------------
From: Hammer <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: all threads in a process share the same pid?
Date: Wed, 16 Aug 2000 04:19:30 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> In comp.os.linux.development.system [EMAIL PROTECTED] wrote:
[snip]
> How do I kill a specific run-away thread without killing all the
> other threads?
Use a signal mask and a signal handler. Use the kill mechanism only as
a last resort. You'll be happy you did. A little extra work, a lot of
peace of mind.
Yes Linux pthreads are a bit of a sham... I still say they are better
than nothing. The abilities are not "trivial"... but neither very
robust nor compliant.
-=hammer
--
MC
"I've been trying to get as far away from myself as I can" - Bob Dylan
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: "E-mu" <[EMAIL PROTECTED]>
Subject: Re: Kernel 2.4.0-test6 Compile and install module problem?
Date: Wed, 16 Aug 2000 00:46:45 -0500
I updated my modutils and pcmcia-cs and I get the same problem. It must be
a source script error?
softrat` <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> E-mu wrote:
> >
> > I have been testign all the kernels thus far with most pretty much the
same
> > configuration on the same PC laptop Dell Inspirion 7500.
> >
> > If I configure the Kernel to include "umsdos" I get a binry error at the
end
> > of the compilation and it bombs out. If I don't include "umsdos" the
kernel
> > does succesfully compile but when I install the modules which is just
PCMCAI
> > and SCSI, the SCSI module bombs out and I get a bunch of depmods at the
end?
> > The scsi module folder thus is not created.
> >
> > Now I say again this has not happend on any of the test hkernels thus
far
> > except 2.4.0-test6. I am runnign Red hat. Right now I am running
> > 2.4.0-test5. And yes I compile new kernels generally under the
originally
> > instaled kernel that installs with Read HAt Linux 6.2 which I believe is
> > 2.2.14-5.0.
> >
> > Could there be soem scripting errors in thsi particular Source of
test6???
> >
> > Anyone see this happen to them??
>
> Try updating your 'modutils' package.
>
> the softrat
> mailto:[EMAIL PROTECTED]
> --
> Life is like a simile.
------------------------------
From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: Submillisecond timing
Date: 16 Aug 2000 07:07:19 GMT
On Tue, 15 Aug 2000 20:29:45 GMT, Jf <[EMAIL PROTECTED]> wrote:
>Hi!
>
>I need to develop an application which core is to write a voltage to an
>external instrument wait a little bit and read a value from another
>instrument. This is nothing difficult in itself but the thing is that the
>whole thing must last 40 microseconds and that I want the error on that
>time to be less than 10%.
>What are the timing possibility in C++?
>I am using Visual C++ 6.0 and the only information I found refers to timer
>with a resolution of 50 milliseconds. Is there anything better than that?
>
>I am currently under windows and some preliminary tests have shown me that
>timing is in fact very unstable. I believe this is due to interupts from
>windows. Can Linux help me in that particular instance for example by
>putting a higher priority on my program over system tasks?
>
>
If your program gives up its time slice the next opportunity it will get
it back will be at the next clock tick or hardware interrupt. Thus for
these timing you probably need a cpu loop, at an increased scheduling
priority. The number of cycles you need to loop is related to the
BogoMips value. Check the kernel sources for how the BogoMips is
calculated and used.
Villy
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: kernel uncompression
Date: Wed, 16 Aug 2000 10:44:05 +0200
Kai Xu wrote:
> =
> Hi,
> =
> Where is the code in the src tree that does the uncompression
> of the compressed kernel ??
/usr/src/linux/lib/inflate.c
But you could have found it out by yourself ...
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
------------------------------
From: Daniel Goergen <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup,comp.os.linux.misc
Subject: Re: kernel compiling for sparc64 under sparc32
Date: Wed, 16 Aug 2000 11:03:56 +0200
Pete Zaitcev wrote:
>
> On Tue, 15 Aug 2000 15:16:01 +0200, Daniel Goergen <[EMAIL PROTECTED]> wrote:
> > Hello!
> > How can I compile a Kernel for a sparc64 on a sparc32 machine?
>
> It is doable. First, you must have a gcc that generates a good
> code for sparc64. DaveM and JJ suggested me to use egcs-1.1.2
> that RH ships. Best of all is to download SRPM from a Redhat
> mirror and compile it.
>
> Then, go into the top level Makefile and set prefixes to your
> compiler. Then look at the clever macro that determines what
> flags to use and ardwire the sparc64 case. Also hardwire ${ARCH}.
>
> Your binutils must support v9 assembler mnemonics.
>
> When all is set, just do "make oldconfig && make dep && make" as always.
>
> Good luck,
> --Pete
Thank you!
I solved it already by myself...
Is it also possible to compile for Sparc64 under i386?
my SPARCstation is too slow...
(i have to compile the Kernel several times...)
greetings
daniel
------------------------------
From: Daniel Goergen <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup,comp.os.linux.misc
Subject: kernel compiling for sparc64 under i386
Date: Wed, 16 Aug 2000 11:58:27 +0200
Hello!
It is possible to compile a kernel for sparc64 on a i386 machine?
daniel
------------------------------
From: Stephan Kleinowski <[EMAIL PROTECTED]>
Subject: Re: PPPoE
Date: Wed, 16 Aug 2000 12:39:46 +0200
Use http://www.math.uwaterloo.ca/~mostrows/ for 2.4.X
David Findlay wrote:
>
> Does Linux 2.4 work with PPPoE? I need it for ADSL.
>
> David Findlay
------------------------------
Subject: Re: intercepting open/read/close calls
From: Bernhard Mogens Ege <[EMAIL PROTECTED]>
Date: Wed, 16 Aug 2000 12:23:57 GMT
>>>>> "Marc" == Marc SCHAEFER <[EMAIL PROTECTED]> writes:
> Bernhard Mogens Ege <[EMAIL PROTECTED]> wrote:
> : Any idea on what would be possible/easiest?
> I have successfully experimented on Debian 2.1 (kernel 2.2.16)
> http://www-internal.alphanet.ch/~schaefer/software.html
> look for intercept
Thanks. I also found something on my own:
http://www.lh.com/~oleg/ftp/syscall-interpose.html
There it is accomplished without using LD_PRELOAD, and but with some
ld magic.
regards,
Bernhard Ege
------------------------------
From: "Ram�n Ag�ero" <[EMAIL PROTECTED]>
Subject: Unresolved symbols.- __kfree_skb
Date: Wed, 16 Aug 2000 15:36:55 +0200
>Hi all,,
I'm writing a little module and I need to use several sk_buffer's
functions. All of them seem to work fine. But when I use kfree_skb and I try
to install the module, I get the message that generates my question...
Could anybody tell me how can I use this function?
Thank you all in advance...
Ram�n
------------------------------
From: Bryan Hackney <[EMAIL PROTECTED]>
Subject: Re: Submillisecond timing
Date: Wed, 16 Aug 2000 08:47:40 -0500
Villy Kruse wrote:
>
[...]
> >
> >I am currently under windows and some preliminary tests have shown me that
> >timing is in fact very unstable. I believe this is due to interupts from
> >windows. Can Linux help me in that particular instance for example by
> >putting a higher priority on my program over system tasks?
> >
> >
>
> If your program gives up its time slice the next opportunity it will get
> it back will be at the next clock tick or hardware interrupt. Thus for
> these timing you probably need a cpu loop, at an increased scheduling
> priority. The number of cycles you need to loop is related to the
> BogoMips value. Check the kernel sources for how the BogoMips is
> calculated and used.
>
Look into sched_setscheduler and the high resolution timers.
40 usec timing can probably be done at the user level with spin waits.
You may want to access the hardware hi-res timers directly to avoid
any system call overhead.
--
Bryan Hackney / BHC / [EMAIL PROTECTED]
http://www.FreeClassAds.com/
http://bhconsult.com/
http://bhconsult.com/bh/pgp.key
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Adding a system call dynamically
Date: Wed, 16 Aug 2000 15:53:53 +0200
Tom Roberts wrote:
>
> James Avery wrote:
> > I have a kernel module that installs an interrupt handler which maintains
> > some state. Now, I want to communicate this state to userland through a
> > system call in this module, [...]
> > So the question is: How does one add a system call -- in a module?
>
> I don't think that is very easy. The "usual" way is to provide a simple
> interface to a new file in /proc. Your user program then uses
> open/read/close. If you make your file ASCII, it's easy to debug using
> cat /proc/myfile.
>
> Tom Roberts [EMAIL PROTECTED]
I don't think current Linux implementations allows modules to
provide new systemcalls. But I think it would be a very usable
posibility to have. For some purposes a /proc interface might
be ineffective or even imposible.
I would like to see things like IPC, and VM86 in modules.
But I don't think you could do that in a /proc interface if
you wan't to be compatible with existing programs.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: doing mmap() twice on the same fd
Date: Wed, 16 Aug 2000 16:11:02 +0200
[EMAIL PROTECTED] wrote:
>
> Is it possible to do mmap() twice on the same fd, but as a different
> number produced from dup(), where one or both is passed to a different
> process, when the fd was opened to /dev/zero, and get both of those
> processes to share memory? I don't want this memory to be part of a
> file anywhere. And what I do want to do is make a pipe from one process
> to another process which dup()'s the fd and passes it over the pipe to
> the connecting process which will then mmap() on it. Note that the
> connecting process is not a descendant of the daemon process. Is this
> at all doable on even some Unix systems to get autonomous shared memory
> in a secure way?
>
Try looking at the man pages for shmget, shmat and
shmctl. I think they can do what you want.
Notice:
I think most kernels do have this feature compiled
in, but if it's missing you might need to recompile
the kernel. You must remember to mark shared memory
segments for removal with shmctl, I believe it is
normally the best choice to do that immediately
after calling shmat.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Loading a driver during installation
Date: Wed, 16 Aug 2000 16:19:44 +0200
John Holmes wrote:
>
> I'm looking for a way to install a driver for a SCSI controller during
> installation. This is driver under developement so the hardware I'm
> trying to install onto doesn't have a driver built into the kernel.
> What I would like is a command to use at the boot prompt at the
> beginning of the install (or some other place if needed) to load the
> driver. I'm using SuSE, Caldera and Red Hat with kernel 2.2.14 and
> Turbo Linux with kernel 2.2.13. The driver is in RPM format. I've
> looked through all the HOWTO pages and don't see anything that'll help.
> Did I over look something in the boot parameters section?
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
> The fastest and easiest way to search and participate in Usenet - Free!
It might help to know why you cannot install the RPM
package after completing the installation.
Anyway, I have one hint, that might help:
When using Red Hat's install program, there
is a bash prompt on one of the VT's.
Press Ctrl+Alt+Fx to activate the VT.
(I don't rember which one of the
F-keys you have to use.. Try.)
Press Ctrl+Alt+F1 to return to install.
It is not possible to load a module from the boot
prompt, if the above does not work, you might need
to use a modified version of the boot floppy.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: set_fs, PTR_ERR, sh_bang
Date: Wed, 16 Aug 2000 16:28:35 +0200
[EMAIL PROTECTED] wrote:
[...]
>
> 2. What does the sh_bang field in the linux_binprm struct do? Is
> this documented anywhere?
>
[...]
If the first line in a file starts with #! it is a script
interpreted by some shell specified on the rest of the line.
To prevent endless chains of scripts, the interpreter may
not be a script. The sh_bang field is used to know if the
file to be executed is an interpreter and therefore may not
be a script itself.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Submillisecond timing
Date: Wed, 16 Aug 2000 16:39:55 +0200
Villy Kruse wrote:
>
[...]
>
> If your program gives up its time slice the next opportunity it will get
> it back will be at the next clock tick or hardware interrupt. Thus for
> these timing you probably need a cpu loop, at an increased scheduling
> priority. The number of cycles you need to loop is related to the
> BogoMips value. Check the kernel sources for how the BogoMips is
> calculated and used.
>
> Villy
It is possible to change the length of the timeslices by
changing the "#define HZ 100" to something else. I cannot
say for sure if it will help in this particular case.
--
Kasper Dupont
------------------------------
From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: set_fs, PTR_ERR, sh_bang
Date: 16 Aug 2000 10:46:52 -0400
In article <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
>Hi,
> 1. I am wondering in what file the set_fs() routine can be found. I
>can't find it... Is there a searchable source code navigator on the
>web that I can use instead of questions like this. nb. I am at work
>on a non-linuxbox so can't jsut search source tree.
Really? tar, find and grep are ported to hell and back, what's the problem?
> 3. The macro PTR_ERR and IS_ERR used in binfmt_elf.c. What do they
>do?
Decode/encode error value (small negative number) into pointer (using the
known-to-be-absent addresses).
--
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid. Get yourself a better computer" - Dilbert.
------------------------------
From: Bhavin Shah <[EMAIL PROTECTED]>
Subject: Testing multi-processor code
Date: Wed, 16 Aug 2000 08:50:28 -0700
Hi,,
I'm trying to test out 2 processors with a simple program in c++
using pthreads. However, I'm still getting the same elapsed time
for 1 and 2 processors when I run the executable "time ./executable".
Is this program flawed with the joins? Or is there something simpler
that would show me a difference in exec. times?
test.cc
=======
#include <stdio.h>
#include <pthread.h>
void *doNothing(void *n)
{
unsigned long max = (unsigned long)n;
pthread_t tid = pthread_self();
int ret = pthread_detach(tid);
printf("Running thread with tid: %d\n", tid);
for (unsigned long i = 0; i < max; i++)
for (unsigned long j = 0; j < max; j++);
printf("Stopped thread with tid: %d\n", tid);
return (void *)NULL;
}
void main()
{
pthread_t tid1, tid2;
unsigned long num = 100000;
pthread_create(&tid1, NULL, &doNothing, (void *)num);
pthread_create(&tid2, NULL, &doNothing, (void *)num);
pthread_join(tid2, NULL);
pthread_join(tid1, NULL);
exit(0);
}
------------------------------
Date: Wed, 16 Aug 2000 17:17:33 +0200
From: Anes Lihovac <[EMAIL PROTECTED]>
Subject: Re: Remote Boot Pxe toolkit
Scott Goodwin wrote:
>
> Hi
>
> I'm currently trying to configure remote boot, using the bootix pxe toolkit.
>
> How do i need to configure the dhcp server so that it tells the client to
> use tftp to download the file i have specified;
>
> My dhcp server conf for the client reads;
>
> option dhcp-class-identifier "PXEClient"
> option vendor-encapsulated-options ff;
>
> host pxeclient {
> hardware ethernet 00:D0:09:53:BA:5D;
> filename "pxboot";
> fixed-address 192.168.57.200;
>
> The file pxboot resides in the tftpboot directory and my mtftp.conf has the
> entry
>
> pxboot 192.168.57.200
>
> Are these settings correct?
>
> Any help would be appreciated?
>
> [EMAIL PROTECTED]
Hi Scott !
you must setup a bootptab in which it indicates which client(specified
by mac adrees and hostname) shold
read which image !
get the bootd package. everthing in there is good documented. if you
have problems feel free to
contact me !
greeting
Anes
------------------------------
From: Mace =?iso-8859-1?Q?Ga=EBl?= <[EMAIL PROTECTED]>
Crossposted-To: linux.dev.kernel,linux.dev.c-programming
Subject: Problem to load a kernel module
Date: Wed, 16 Aug 2000 16:01:57 +0000
==============0E2952F08C70F8357A7257C8
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Hi,
I'm currently developing a device driver under a kernel 2.2.13-7 mdk
(Mandrake 6.1). The compilation seems to be ok, nevertheless the
loading fails (insmod version 2.3.10-pre1). Below an example of what I
tried. What is the mistake ?
Thanks for your help
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/version.h>
int init_module(void) { printk("Hello !!!!!!\n"); return 0; }
void cleanup_module(void) { printk("Bye !!!!!!\n"); return; }
>>>> gcc -c hello.c -O2 -Wall -DMODULE
hello.c: In function `init_module':
hello.c:9: warning: implicit declaration of function `printk'
Compilation finished at Wed Aug 16 17:55:49
>>>>>> insmod hello.o
hello.o: unresolved symbol printk
--
Ga�l MACE
===>> Speed can kill, use Windows <<==========
==============0E2952F08C70F8357A7257C8
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi,
<p>I'm currently developing a device driver under a kernel 2.2.13-7 mdk
(Mandrake 6.1). The compilation seems to be ok, nevertheless the
loading fails (insmod version 2.3.10-pre1). Below an example of what
I tried. What is the mistake ?
<p>Thanks for your help
<br>
<br>
<p>#include <linux/config.h>
<br>#include <linux/module.h>
<br>#include <linux/kernel.h>
<br>#include <linux/version.h>
<br>
<p>int init_module(void) { printk("Hello !!!!!!\n"); return 0; }
<br>void cleanup_module(void) { printk("Bye !!!!!!\n"); return; }
<p>>>>> gcc -c hello.c -O2 -Wall -DMODULE
<br>hello.c: In function `init_module':
<br>hello.c:9: warning: implicit declaration of function `printk'
<p>Compilation finished at Wed Aug 16 17:55:49
<p>>>>>>> insmod hello.o
<br>hello.o: unresolved symbol printk
<br>
<pre>--
Gaël MACE
===>> Speed can kill, use Windows <<==========</pre>
</html>
==============0E2952F08C70F8357A7257C8==
------------------------------
** 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
******************************