Linux-Development-Sys Digest #998, Volume #7 Thu, 6 Jul 00 09:13:09 EDT
Contents:
Re: copy_from_user ("Dennis Huang")
Linux kernel 2.4 and POSIX.1E ("XuYifeng")
Re: Java on SMP linux. ("Rex Dieter")
Re: Confirm this bug: CodeWarrior does not support spaces in paths? (Erik Max
Francis)
Re: Java on SMP linux. (Kaz Kylheku)
Re: Romable Linux ("Jason Zaugg")
Re: how to implement route (mostly new in network programming!) (Markus Pietrek)
Re: Accidentally deleted "init " directory ("Quiney, Philip [HAL02:HH00:EXCH]")
Re: mapping ISA device memory in kernel space (Mathias Waack)
Re: how to implement route (mostly new in network programming!) (Mathias Waack)
Is there some way to track page faults without kernel hacking ? ("Eugene Shchepetov")
Re: can't implement get_user (Robert Kaiser)
create_module & init_module (Benjamin Morin)
Re: Is there some way to track page faults without kernel hacking ? (Mathias Waack)
device driver (Anders Johansson)
Re: device driver (Benjamin Morin)
Re: Problems with writel in a device driver: please help save lives! (Nick Bailey)
Re: Accidentally deleted "init " directory (B'ichela)
I want make my own system call ("Eugene Shchepetov")
Re: I want make my own system call (Benjamin Morin)
SIGIO (Benjamin Morin)
Re: Confirm this bug: CodeWarrior does not support spaces in paths? (Csaba Raduly)
Re: Confirm this bug: CodeWarrior does not support spaces in paths? (Csaba Raduly)
What does lock_kernel and unlock_kernel actualy makes ? ("Eugene Shchepetov")
----------------------------------------------------------------------------
From: "Dennis Huang" <[EMAIL PROTECTED]>
Subject: Re: copy_from_user
Date: Thu, 6 Jul 2000 10:52:15 +0800
Dear all,
I have found that there is no CRC code in my
/usr/include/linux/modules-smp/i386_ksyms.ver for best_copy_from_user.
I added two lines following and it works! Is it the kernel problem?
#define __ver_best_copy_from_user smpe183bad0
#define best_copy_from_user _set_ver(best_copy_from_user)
yours, Dennis
"Dennis Huang" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> I am new to Linux and met a problem.
> I used copy_from_user() in my IOCTL function.
> But the kernel refused to load my module.
> It can't find the symbol best_copy_from_user().
>
> I have checked the /proc/ksyms, there is only a best_copy_from_user()
> function with version CRC code. And my precompiled code has a barely
> best_copy_from_user() function without version CRC. I think that's why
the
> kernel refused to load the module.
> Other functions like printk() work.
>
> Enviroment:
> RedHat 6.2 smp kernel.
> Linux kernel 2.2.14smp with gcc egcs-2.91.66.
>
> Any help will be appreciate.
>
> yours, Dennis
>
>
------------------------------
From: "XuYifeng" <[EMAIL PROTECTED]>
Subject: Linux kernel 2.4 and POSIX.1E
Date: Thu, 6 Jul 2000 11:33:52 +0800
Hi,
will Linux kernel 2.4 support POSIX.1E security extensions ?
like ACL, Auditing and Mandatory Access Control?
Regards,
XuYifeng
------------------------------
From: "Rex Dieter" <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.java.programmer
Subject: Re: Java on SMP linux.
Date: Wed, 5 Jul 2000 01:07:17 -0500
"1$worth" <"1$worth"@costreduction.plseremove.screaming.net> wrote in
message news:[EMAIL PROTECTED]...
> Ronald Cole wrote:
> >
> > [EMAIL PROTECTED] (Thaddeus L Olczyk) writes:
> > > Sun claims that their Java does not work on linux in SMP (
Really? I thought their JDK (based on a previous blackdown JDK) uses native
threads...
> > blackdown.org
> Does this fully use SMP??????
Yes. The blackdown JDK 1.2's now use native threads by default, which will
use all available CPUs (at least better than green threads).
-- Rex
------------------------------
From: Erik Max Francis <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Confirm this bug: CodeWarrior does not support spaces in paths?
Date: Wed, 05 Jul 2000 22:29:24 -0700
Kent Sorensen wrote:
> Strictly speaking this is not a CodeWarrior bug. CodeWarrior for Linux
> uses the native Linux compilers and linkers - not Metrowerks own
> compilers and linkers that the Mac or Windows versions of CodeWarrior
> uses. These certainly have no trouble with spaces in the filenames.
>
> The problems with spaces in the filename must be in the native tools.
That doesn't follow. The bug (whatever it is) could simply be in the
way that CodeWarrior interfaces with the native Linux tools.
--
Erik Max Francis / [EMAIL PROTECTED] / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ The quickest way of ending a war is to lose it.
\__/ George Orwell
Maths reference / http://www.alcyone.com/max/reference/maths/
A mathematics reference.
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: comp.lang.java.programmer
Subject: Re: Java on SMP linux.
Reply-To: [EMAIL PROTECTED]
Date: Thu, 06 Jul 2000 05:48:41 GMT
On Wed, 5 Jul 2000 01:07:17 -0500, Rex Dieter <[EMAIL PROTECTED]> wrote:
>
>"1$worth" <"1$worth"@costreduction.plseremove.screaming.net> wrote in
>message news:[EMAIL PROTECTED]...
>> Ronald Cole wrote:
>> >
>> > [EMAIL PROTECTED] (Thaddeus L Olczyk) writes:
>> > > Sun claims that their Java does not work on linux in SMP (
>
>Really? I thought their JDK (based on a previous blackdown JDK) uses native
>threads...
Ah, but only a real OS like Solaris has true SMP, you see. ;)
--
#exclude <windows.h>
------------------------------
From: "Jason Zaugg" <[EMAIL PROTECTED]>
Subject: Re: Romable Linux
Date: Thu, 6 Jul 2000 16:21:36 +1000
I've used an eLia board (www.moreton.com) that boots uClinux from ROM. IIRC,
it copies (actually, it uncompresses) the ROM image into RAM, and then
boots. (come to think of it, it goes from flash to RAM, but it's the same
idea)
I'm not sure what would be involved in kernel execution from ROM, or why it
would be necessary, other than to save on a little RAM.
Jason Zaugg
[EMAIL PROTECTED]
Kevin P. Dankwardt <[EMAIL PROTECTED]> wrote in message
news:8jvkne$[EMAIL PROTECTED]...
> Does anyone know a reference to a discussion of what was required to make
a
> version of Linux run from ROM? I've heard people say they've done it and
> it's a bit tricky. But, I haven't heard anyone say what they had to do.
>
> This is for embedded devices, there is RAM and/or Flash in the system, but
> the kernel runs/boots from ROM.
>
> thanks.
>
>
------------------------------
Date: Thu, 06 Jul 2000 08:55:07 +0200
From: Markus Pietrek <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: how to implement route (mostly new in network programming!)
"Robichaud, Jean-Philippe [BAN:6S33:EXCH]" wrote:
>
> Hi, I'm must implement a routing routine. I've have look at the source
> of "route" in the nettools package but I can't understand what is
> happening, even if I follow the program with xxdbg. Can someone tell me
> where can I get a simple example or good documentation about
> implementing routing ?
>
> What I have to do is to save the actual routing table and restore it
> later. Any suggestion?
Why not use "add" and "delete" of the route program, and call it via
shell?
--
Markus Pietrek
Tel: +49-761-47094-13
Fax: +49-761-47094-29
Web: http://www.concept.de
Concept Engineering GmbH
Boetzinger Strasse 29
D-79111 Freiburg/Germany
------------------------------
From: "Quiney, Philip [HAL02:HH00:EXCH]" <[EMAIL PROTECTED]>
Subject: Re: Accidentally deleted "init " directory
Date: Thu, 06 Jul 2000 07:52:09 +0100
Hima Parimisetty wrote:
>
> Hi all,
> I have accidentally deleted "init" and "lib" directories I have both
> Windows NT and Linux installed on my workstation.I had some important data
> on the linux partition,so i can't reinstall linux .Can anyone please tell
> me what i should do?
Hi,
I think you have 2 solutions to this....
As long as your 'important' data is not anywhere the system is installed
in then you should be able to 'Upgrade' rather than 'Install' which will
skip the partition/format phase. (You didn't specify distro - certainly
an upgrade is possible in RedHat). The only problem I see with this is
if the installer refuses to 'Upgrade' the same version that is already
(aparently) installed - it may offer to go ahead anyway as that would be
the Unix Way (tm).
As an alternative - borrow, beg or steal another HDD and install clean
on that one making the original disk a 'slave'. Then mount the linux
partition on the slave disk and extract your data that way...
I assume you have learnt that being logged in as root is to be avoided
unless you need it ;-)
HTH
Regards
Phil Q
--
Phil Quiney CSIP Demonstrator
[EMAIL PROTECTED] Nortel Networks,
Telephone: +44 (1279) 402363 London Rd, Harlow,
Fax: +44 (1279) 402885 Essex CM17 9NA,
United Kingdom.
"This message may contain information proprietary to Northern
Telecom so any unauthorised disclosure, copying or distribution
of its contents is strictly prohibited."
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: mapping ISA device memory in kernel space
Date: 06 Jul 2000 08:48:28 +0200
[EMAIL PROTECTED] writes:
> If I directly use memcpy_fromio function, will it work for copying
> data <=8kb
I don't know any restrictions for the data size. Try it out.
Mathias
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: how to implement route (mostly new in network programming!)
Date: 06 Jul 2000 08:51:34 +0200
"Robichaud, Jean-Philippe [BAN:6S33:EXCH]" <[EMAIL PROTECTED]> writes:
> Hi, I'm must implement a routing routine. I've have look at the
> source of "route" in the nettools package but I can't understand what
> is happening, even if I follow the program with xxdbg. Can someone
> tell me where can I get a simple example or good documentation about
> implementing routing ?
>
> What I have to do is to save the actual routing table and restore it
> later. Any suggestion?
Why do you not call /sbin/route to do your work? Capture the output
from route (or /proc/route) and restore it by calling the route program.
Mathias
------------------------------
From: "Eugene Shchepetov" <[EMAIL PROTECTED]>
Subject: Is there some way to track page faults without kernel hacking ?
Date: Thu, 6 Jul 2000 10:35:51 -0700
May be there syscall for it, but didn't find it. I can hack fault.c and
make statistic on faults, but I don't like this way.
------------------------------
From: [EMAIL PROTECTED] (Robert Kaiser)
Subject: Re: can't implement get_user
Date: 6 Jul 2000 07:56:35 GMT
In article <8jvg74$9p3$[EMAIL PROTECTED]>,
"Eugene Shchepetov" <[EMAIL PROTECTED]> writes:
> I'l writing kernel module that's uses data from user process. There
> get_user function in my source code. Everything compiles good - but when I
> try to insmod it - an error occurs : unresolved __get_user_X
> There only __get_user_x that I found i kernel source in uaaccess.h.
> I think I make a very stupid error :-)
You must compile your module with optimization turned on (compile
flag -O). If gcc does not optimize, it will fail to remove references
to functions that are not exported by the kernel (and that are never
actually called by your module).
HTH
Rob
================================================================
Robert Kaiser email: rkaiser AT sysgo DOT de
SYSGO RTS GmbH
Klein-Winternheim / Germany
------------------------------
From: Benjamin Morin <[EMAIL PROTECTED]>
Subject: create_module & init_module
Date: Thu, 06 Jul 2000 10:49:48 +0200
Hello,
I'd like to insert a module dynamically, but I don't know how to get the
"size" value in the following function :
int create_module(char *module_name, unsigned long size);
How do I compute "size"? I've had a look at insmod source code, but it
seems that it has its own function to do this. Isn't there a simple way
to insert a module (int insmod(char* filename) :)), except
exec("/sbin/insmod", "insmod", "module.o", NULL) ??
Thanks
Ben
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: Is there some way to track page faults without kernel hacking ?
Date: 06 Jul 2000 10:20:28 +0200
"Eugene Shchepetov" <[EMAIL PROTECTED]> writes:
> May be there syscall for it, but didn't find it. I can hack fault.c
> and make statistic on faults, but I don't like this way.
Live is hard and unfair;)
IIRC there was a way to inform a user process about interrupts. I don't
know if its a mechanism in the kernel, a third party kernel module or
a hack.
Or just as a first idea: you could write a module which takes the
MMU interrupt and stores the old interrupt vector. On each interrupt
it informs your userland program and calls the old interrupt routine
from the stored interrupt vector. I don't know if its possible, it
would be a cleaner solution then patching the kernel. Could someone
tell us more?
(it sounds interesting, if it works pls. send me a copy)
Mathias
------------------------------
From: Anders Johansson <[EMAIL PROTECTED]>
Subject: device driver
Date: Thu, 06 Jul 2000 10:56:08 +0200
Hi!
I found some problems finding drivers for my internal modem
(SupraExpress). Seems like there is none, wonder if somebody knows
anything about that? if not does someone knows where can I get useful
information ( document, book, sample program
source code,... ) for writing my one driver?
br
Anders
------------------------------
From: Benjamin Morin <[EMAIL PROTECTED]>
Subject: Re: device driver
Date: Thu, 06 Jul 2000 11:13:38 +0200
I guess "Linux Device Drivers" from O'REILLY is the right book.
Otherwise, you can go and have a look at http://linuxfr.org/LDP/
Ben
> Hi!
> I found some problems finding drivers for my internal modem
> (SupraExpress). Seems like there is none, wonder if somebody knows
> anything about that? if not does someone knows where can I get useful
> information ( document, book, sample program
> source code,... ) for writing my one driver?
> br
> Anders
------------------------------
From: [EMAIL PROTECTED] (Nick Bailey)
Subject: Re: Problems with writel in a device driver: please help save lives!
Date: Thu, 6 Jul 2000 10:23:13 +0100 (BST)
Thanks very much for replying, Mathias! I'll try your ideas and get back.
Mathias Waack wrote:
> What a dramatic subject;)
> Hope I don't make any mistakes and kill some of your
> patients.
>
That is the surgeons' job, not mine 8-)
>
> [EMAIL PROTECTED] (Nick Bailey) writes:
> > kernel on the development machine. This is pro bono work, by the way,
> > for a UK heart research charity.
>
> What does "pro bono" mean?
>
I'm not charging for doing it (thought that was fair, seeing that I didn't
know what I was doing 8-)
>
> > cat /proc/pci) records). We then map the memory using
> > ioremap_nocache() and hit it with the configuration bit twiddling.
>
> You cannot use writel on mapped regions. Ether you map the region
> or you access per PIO using the writeX family.
OK, that's a pretty fundamental mistake! I'd not grasped that by reading
the kernel docs or looking at the other drivers.
>
> If your memory on the PCI card is mappable, then you should
it is...
>
> instead of
> writel(SamplingFrequency,
> PEGASUS_ECL_CONTROL_REG(pegasus_base));
> better use
> *(pegasus_base + PEGASUS_ECL_CONTROL_REG) = SamplingFrequency;
> ...
Thanks a lot for this. I'll go away and try it some time today.
Nick/
--
Dr N J Bailey, mailto:[EMAIL PROTECTED]
Deputy Director, Interdisciplinary Centre for Scientific Research in Music
Lecturer in Applied Computing, School of Electronic and Electrical Engineering
University of Leeds. http://www.ee.leeds.ac.uk/homes/NJB
------------------------------
From: [EMAIL PROTECTED] (B'ichela)
Subject: Re: Accidentally deleted "init " directory
Date: Thu, 6 Jul 2000 05:53:34 -0400
Reply-To: [EMAIL PROTECTED]
On Wed, 05 Jul 2000 22:30:04 GMT, Hima Parimisetty <[EMAIL PROTECTED]> wrote:
>Hi all,
> I have accidentally deleted "init" and "lib" directories I have both
>Windows NT and Linux installed on my workstation.I had some important data
>on the linux partition,so i can't reinstall linux .Can anyone please tell
>me what i should do?
>
>Thanks and regards,
>Hima.
>
>--
>Posted via CNET Help.com
>http://www.help.com/
If you are running slackware (although this info is fairly
generic) just install your color.gz disk in the drive. Mount the
partitions in order under /mnt manually. Although if you use setup to
do it. just DON't select the FORMAT option! heres a sane example
My system mainly is Scsi based with a tiny IDE drive (mainly
holds my MSDOS and CP/M 86 operating systems). Now after I boot up the
color.gz disk under targets I mount my stuff as follows
/dev/sda1 /
/dev/sdb1 /usr
/dev/sdd1 /usr/src
In NONE of these do I ask the system to format the drives!!
Ok now your basic init scripts are located in the A1 disk set under
aaa_base.tgz This is the package to stuff in. That will get th the
basic libs and the stock init scripts.
What this does is puts the basic /lib stuff back as well as the
/etc directory. You can use pkgtool or installpkg and do it manually if
you want.
heres how:
mount /dev/sda1 /mnt -t ext2
mount /dev/sdb1 /mnt/usr -t ext2
mount /dev/sdd1 /mnt/usr/src -t ext2
cd /mnt
Lets assume your cdrom is /dev/scd0 do this
mount /dev/scd0 /cdrom -t iso9660 -o ro
lets grab the aaa_base.tgz package. From my online man page the
following is the right method for installpkg:
ROOT=/mnt installpkg /cdrom/slakware/a1/aaa-base.tgz
May I strongly recommend for the future. Back your system up
more often!!!! You will need to fix your /etc files to restore your
original settings now. However, you can now login! (thats a start!)
--
B'ichela
------------------------------
From: "Eugene Shchepetov" <[EMAIL PROTECTED]>
Subject: I want make my own system call
Date: Thu, 6 Jul 2000 12:39:37 -0700
What I must do - please tell, I need full description - thanks
Eugene
------------------------------
From: Benjamin Morin <[EMAIL PROTECTED]>
Subject: Re: I want make my own system call
Date: Thu, 06 Jul 2000 13:12:19 +0200
> What I must do - please tell, I need full description - thanks
>
Have a look at http://linuxfr.org/LDP/guides.html, get the "The Linux
Kernel Module Programming Guide", you have a description of how to
change an existing system call. It's easy to make a new one from that.
Ben
------------------------------
From: Benjamin Morin <[EMAIL PROTECTED]>
Subject: SIGIO
Date: Thu, 06 Jul 2000 14:16:04 +0200
Hello,
I'd like my process to be informed whenever something is written into a
given file. I thought this piece of code would be all right, but it
doesn't work... Could someone help me?
Ben
#include <signal.h>
#include <stdio.h>
#include <fcntl.h>
int descfile;
void handler(int ignore)
{
printf("Something was changed\n");
}
void bye(int gg)
{
close(descfile);
printf("bye bye\n");
exit(0);
}
int main()
{
int val;
if((descfile = open("fichier", O_RDONLY))==-1) {
fprintf(stderr, "Error opening file\n");
exit(0);
}
signal(SIGIO, &handler);
signal(SIGINT, &bye);
val = fcntl(desfile, F_GETFL, 0);
val |= O_ASYNC;
fcntl(descfile, F_SETFL, val);
fcntl(descfile,F_SETOWN,getpid());
while(1) {
pause();
}
}
------------------------------
From: [EMAIL PROTECTED] (Csaba Raduly)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Confirm this bug: CodeWarrior does not support spaces in paths?
Date: 6 Jul 2000 12:16:35 GMT
06 Jul 2000: A formal bug report was sent to Seti@Home, because the
following message originated from [EMAIL PROTECTED] (Erik Max Francis)
was reported as containing signs of intelligence:
>Kent Sorensen wrote:
>
>> Strictly speaking this is not a CodeWarrior bug. CodeWarrior for
>> Linux uses the native Linux compilers and linkers - not Metrowerks
>> own compilers and linkers that the Mac or Windows versions of
>> CodeWarrior uses. These certainly have no trouble with spaces in
>> the filenames.
>>
>> The problems with spaces in the filename must be in the native
>> tools.
>
>That doesn't follow. The bug (whatever it is) could simply be in
>the way that CodeWarrior interfaces with the native Linux tools.
>
In which case I'd suspect a careless invocation of system(), and
/bin/sh chopped the string at the spaces.
There's the rub: no C program has trouble with spaces in strings. It's
usually the shall which treats spaces as argument separators.
--
Csaba Raduly, Software Developer (OS/2), Sophos Anti-Virus
mailto:[EMAIL PROTECTED] http://www.sophos.com/
US Support +1 888 SOPHOS 9 UK Support +44 1235 559933
Life is complex, with real and imaginary parts.
------------------------------
From: [EMAIL PROTECTED] (Csaba Raduly)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Confirm this bug: CodeWarrior does not support spaces in paths?
Date: 6 Jul 2000 12:17:45 GMT
28 Jun 2000: A formal bug report was sent to Seti@Home, because the
following message originated from [EMAIL PROTECTED] (Roger Shawl)
was reported as containing signs of intelligence:
[snip Q about spaces in paths]
>
>[Incidentally, as long as I have those familiar with CW Linux here,
>as a coddled PC/Mac programmer long accustomed to IDEs - and not
>very comfortable or happy with Make files - what other alternatives
>are there to CW for development on Linux?]
>
Try Code Crusader (somewhere on caltech.edu or stuff)
--
Csaba Raduly, Software Developer (OS/2), Sophos Anti-Virus
mailto:[EMAIL PROTECTED] http://www.sophos.com/
US Support +1 888 SOPHOS 9 UK Support +44 1235 559933
Life is complex, with real and imaginary parts.
------------------------------
From: "Eugene Shchepetov" <[EMAIL PROTECTED]>
Subject: What does lock_kernel and unlock_kernel actualy makes ?
Date: Thu, 6 Jul 2000 14:57:30 -0700
Is it performs a full stop of kernel (except some life-parts of course) ?
What parts are still working ? What can I do (call, implement) and what I
can't between lock and unlock ?
By the way I want to prevent process memory access from anyone but my kernel
process, is a lock_kernel helps ?
Thanks
Eugene
------------------------------
** 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
******************************