Linux-Development-Sys Digest #116, Volume #8 Thu, 31 Aug 00 13:13:19 EDT
Contents:
Re: where is archive URL for this news group? (Ronald Cole)
Re: Kernel panic: VFS: (Michel Talon)
which kernel version support AGP? (Benny Li)
Re: sleep in driver ("Z")
PHP installation problems ("Nils M. Lunde")
Re: sleep in driver (Kaz Kylheku)
Re: open a file in kernel space (Thomas Schwere)
Re: open a file in kernel space (Alexander Viro)
Re: Detecting applications faults (Andi Kleen)
Lilo, mounting the root in a ramdisk (Jerome Corre)
Memory allocation Strangeness. (Olivier CARRERE)
Re: Detecting applications faults (Daniel Norton)
Re: Detecting applications faults (Daniel Norton)
lexmark 2050 ("Rafael Porcel")
Re: (YASP) Seagate Barracuda (ST318416W) Incompatibility (Henry_Barta)
----------------------------------------------------------------------------
From: Ronald Cole <[EMAIL PROTECTED]>
Subject: Re: where is archive URL for this news group?
Date: 30 Aug 2000 22:14:43 -0700
[EMAIL PROTECTED] writes:
> Does anyone know the website hosting the archive of this newsgroup?
> Sent via Deja.com http://www.deja.com/
Yeah, <http://www.deja.com/usenet/>. So close and yet so far...
--
Forte International, P.O. Box 1412, Ridgecrest, CA 93556-1412
Ronald Cole <[EMAIL PROTECTED]> Phone: (760) 499-9142
President, CEO Fax: (760) 499-9152
My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084 4A88 8851 E6C8 69E3 B00B
------------------------------
From: Michel Talon <[EMAIL PROTECTED]>
Subject: Re: Kernel panic: VFS:
Date: Thu, 31 Aug 2000 09:04:35 +0200
Karl Heyes <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>, xavian anderson macpherson
> <[EMAIL PROTECTED]> wrote:
>> i am having a similar problem.
>> being that i mentioned the FreeBSD migration; is there anyway to change my
>> existing filesystem over to UFS without having to lose my data. it occurs to
>> me that if you can defragment a hard disk without losing data, you should be
>> able to use the same type of procedure to change your filesystem.
>>
Linux is able to read the freebsd filesystem (UFS) and freebsd is able to read
the Linux filesystem (ext2) up to a minor tweak (you have to run mke2fs with
some flag so that standard ext2 is produced and not extended recent one). So
there is no problem migrating files between the two.
> depends on how complex the filesystem along with how much space there is. It's
> easier to transfer the data elsewhere (maybe backup!!), recreate, and restore
>> if however FreeBSD can use reiserfs, then i don't need to do anything to my
>> system at all!
>>
No, there is no port of reiserfs to freebsd as far as i know.
> Whats the license situation?
>> the only other option that i can see, is if there is some way to compile
>> FreeBSD kernel components into a linux kernel; or vice-versa. i mean, is it
>> possible to combine the sources of the two systems into one kernel.
Here you have to consider that a kernel is a very intricate program, and that
modules assume a lot on the structure of this program. There is no hope that
linux modules may work on freebsd or conversely. Even in Linux there was
(is ?) versioning on modules so that you could run a module only with a
corresponding version of kernel; in freebsd there is still no versioning and
people are sometimes bitten by modules out of phase with kernel. To remedy
this modules are now systematically build at the same time the kernel is
buildt.
--
Michel Talon
------------------------------
From: Benny Li <[EMAIL PROTECTED]>
Subject: which kernel version support AGP?
Date: Thu, 31 Aug 2000 07:34:39 GMT
hi,
I want to use Voodoo3 3000 AGP, but I heard that earlier kernels
don't support AGP yet. Can somebody please tell me which kernel
version(s) support AGP?
thanks,
ben
------------------------------
From: "Z" <[EMAIL PROTECTED]>
Subject: Re: sleep in driver
Date: Thu, 31 Aug 2000 10:09:38 +0100
Once upon a while [EMAIL PROTECTED] wrote:
> Hi
> I tried to implement the sleep using jiffies as given in Rubini text.
> It doesn't compile in 2.2.x kernel.
>
> so i changed the code to
> ulJiffyForTimeout = jiffies + 50 * HZ; // sleep for 0.5 seconds
> current->state = TASK_INTERRUPTIBLE;
> schedule_timeout(ulJiffyForTimeout);
> schedule();
> current->timeout = 0;
>
> 1.is this code right?
> 2. Should I use interruptible_sleep_on instead of schedule? what is the
> difference?
>
> regards
> jeseem
> mailto:[EMAIL PROTECTED]
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Hi,
sorry but I do not know the sollution to your problem, I simply
wanted to advice you that Rubinis book is written for Kernel
version 2.0 and does not cover most changes in 2.2.
Richard Gooch on his web page documents the chages in the kernel
and will most likely also cover changes in schedule. Here is the
link to the "Kernel API changes from 2.0 to 2.2":
http://www.atnf.csiro.au/~rgooch/linux/docs/porting-to-2.2.html
Hope this helps, not only now but also in future.
Z
--
LISP is worth learning for the profound enlightenment experience you
will have when you finally get it; that experience will make you a
better programmer for the rest of your days. Eric S. Raymond
------------------------------
From: "Nils M. Lunde" <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.help
Subject: PHP installation problems
Date: Thu, 31 Aug 2000 13:20:41 +0200
I'm trying to install PHP4 on a computer running RedHat Linux 6.0, Apache
1.3.12 and the latest version of MySQL. I'm using mod_so to "compile" the
PHP module into Apache.
The problem arises after I've ran the "./configure --with-mysql --with-apxs"
command and then "make".
When I try to run "make install" I get the following message:
"apxs -i -a -n php4 libs/libphp4.so
cp libs/libphp4.so /usr/lib/apache/libphp4.so
cp: libs/libphp4.so: No such file or directory
apxs:Break: Command failed with rc=65536"
Anyone who knows what this means?
Isn't the apxs command supposed to make the libphp.so-file?
Nils Magne Lunde
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: sleep in driver
Reply-To: [EMAIL PROTECTED]
Date: Thu, 31 Aug 2000 11:32:34 GMT
On Wed, 30 Aug 2000 16:46:33 GMT, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>Hi
> I tried to implement the sleep using jiffies as given in Rubini text.
>It doesn't compile in 2.2.x kernel.
>
>so i changed the code to
> ulJiffyForTimeout = jiffies + 50 * HZ; // sleep for 0.5 seconds
> current->state = TASK_INTERRUPTIBLE;
> schedule_timeout(ulJiffyForTimeout);
> schedule();
> current->timeout = 0;
>
>1.is this code right?
No. You do not need the two calls to the scheduler; just schedule_timeout()
is enough. The schedule_timeout is simply a timed-out version of schedule().
The schedule() suspension is indefinite; the task will suspend until it
is woken by some event. The schedule_timeout() spontaneously wakes up
(due to the use of an internally generated timer event).
>2. Should I use interruptible_sleep_on instead of schedule? what is the
>difference?
The difference is that interruptible_sleep_on is kind of an all-inclusive
package which sets the task state, queues it to wait on a queue, and calls the
scheduler. It's not what you want because it's not timed out, and presumably
because you don't have a queue?
Also, using interruptible_sleep_on can lead to lost wakeup race conditions.
That is, in code like
if (!dont_have_what_im_looking_for)
interruptible_sleep_on(...);
the sought-after interrupt-driven event could arrive just after the test, but
before the sleep, in which case it will wake up an empty queue and be lost
in the bit bucket.
In Linux 1.2, there was no SMP, so you could get away with code like the above
if you had interrupts disabled with cli(); the disabling of interrupts ensured
the atomicity needed.
--
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.
------------------------------
Date: Thu, 31 Aug 2000 14:24:18 +0200
From: Thomas Schwere <[EMAIL PROTECTED]>
Subject: Re: open a file in kernel space
Thanks a lot for this link. I can now open and read from the file in the
kernel space.
But how can I get the file size? And how can I read a line from a text
file (fgets in user space)?
Best regards
Thomas
Andy Jeffries wrote:
> > How can I achieve this? How can I access the file data
> > within the kernel space?
>
> Have a look at the kHTTPd page (do a google.com search for it), it
> has a nice clear example of opening and reading from a file in Kernel
> space.
>
> Alternatively, have a look at the source code for BestCrypt for Linux
> (www.jetico.sci.fi), it has an example of a userspace app passing in a
> file descriptor and having the kernel module convert that to an inode
> and use it.
>
> Hope that helps (BTW, we are going to be trying to do this with
> Scramdisk for Linux....hence how I know of those two examples).
>
> --
> Andy Jeffries
> Lead-developer of Scramdisk for Linux
> Developer of original Scramdisk Delphi Component
--
//\\\\
| ~ ~ |
( O O )
___________________________________oOOo______( )_____oOOo_______
Thomas Schwere Phone: +41 1 445 16 61
Supercomputing Systems AG Fax: +41 1 445 16 10
Technoparkstrasse 1 Url: www.scs.ch
CH-8005 Zurich Email: [EMAIL PROTECTED]
Switzerland
Oooo
_________________________________________oooO______( )_________
( ) ) /
\ ( (_/
\_)
------------------------------
From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: open a file in kernel space
Date: 31 Aug 2000 09:17:48 -0400
In article <[EMAIL PROTECTED]>, Thomas Schwere <[EMAIL PROTECTED]> wrote:
>Thanks a lot for this link. I can now open and read from the file in the
>kernel space.
>But how can I get the file size? And how can I read a line from a text
>file (fgets in user space)?
What's wrong with kernel_thread() followed by execve() of userland helper?
That way _all_ environment problems go away - you have the whole libc and
don't have to reimplement the stuff that already exists. See how it is done
in kmod.c (request_module()). If you are in BDSM - sure, no problems, you
can reimplement everything in the kernel, but what for?
--
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid. Get yourself a better computer" - Dilbert.
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: Detecting applications faults
Date: 31 Aug 2000 16:26:08 +0200
Rosimildo da Silva <[EMAIL PROTECTED]> writes:
> In a nutshell it works like that:
>
>
> When an application raises a fault ( e.g. SIGABRT, SIGFPE, SIGSEGV,
> SIGTRAP, SIGIOT),
> something similar to a coredump, Windows NT does one of the following:
>
> a) if the application is running uder a debugger, it passes the
> exception to the
> debugger; end of it.
Linux does the same. The debugger sees all signals before the debugee does.
>
> b) if not, it raises what they call "fisrt chance exception", and if
> the application
> has a handler installed, and handles the exception, ok it is ready
> to continue
> if the application decides to do so, otherwise...
Signals are similar. The otherwise is a core dump normally. The parent gets
told that the application has coredumped via a wait*() flag (when the application
has no parent anymore this is init)
There is no standard way to log coredumps globally except running
find / -name core -type d regularly, but it is very easy to extend the
kernel to do it (isn't free software fun):
(untested code follows. It'll also only work for ELF executables)
In the 2.2 kernel you can just insert something like:
{
struct task_struct *t = current;
char *s;
char *p = get_free_page(GFP_KERNEL);
if (p && t->fs && t->fs->pwd)
d_path(t->fs->pwd, p, PAGE_SIZE);
else
s = "";
printk(KERN_INFO "program %s has core dumped with signal %d into core
file %s/core\n",
current->comm, signr, p);
}
into fs/binfmt_elf.c:elf_core_dump directly before the filp_open().
Then tell syslogd via /etc/syslog.conf to also pipe all kernel messages to
a named pipe. Your program opens the other end of the named pipe, looks for
these messages and you can start analyzing the core dump.
-Andi
------------------------------
From: Jerome Corre <[EMAIL PROTECTED]>
Subject: Lilo, mounting the root in a ramdisk
Date: Thu, 31 Aug 2000 15:11:09 GMT
hi
I have made a small ditribution of linux (for fun and to get to know
linux a bit better) which fit on two floppy. the first floppy hold a
compressed image of the kernel (without lilo) the second floopy a
compressed image of the root fs. This works fine after the kernel is
booted, it prompt for me to insert the second floopy and then load the
root image in a ramdisk and mount this ramdisk as root.
I wanted to experiment a bit more, I have an old pc with an lilo and two
partition on its hard disk. The first partition, hda1 hold a small file
system (/boot) with the kernel image and some other file. The second
partition, hda2 is intentionaly small (2mb).
I try to boot the kernel in hda1 and then be prompted to insert the
floopy containing the root image for it to be loaded in a ramdisk and
the ramdisk to be mounted as root, that works fine as well.
Then i try to boot the kernel on hda1 and load a root image hold in hda2
into a ramdisk and then the ramdisk to be mounted as root, I can't get
that to work :-(
here is my lilo.conf
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
compact
prompt
timeout=50
default=linux
image=/boot/vmlinuz-2.2.12-20
label=linux
read-only
root=/dev/hda2
image=/boot/vmlinuz-2.2.12-20
label=rootfloopy
read-only
root=/dev/fd0
It seem that the kernel try to mount hda2 as root( which cause a panic),
where i want it to load a ramdisk with an iamge stored on hda2 and then
mount the ramdisk as root, Is it possible? How can i do it?
I have look through both
Bootdisk-Howto and Bootprompt-howto without success
thanks for any help
Jerome Corre
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Olivier CARRERE <[EMAIL PROTECTED]>
Subject: Memory allocation Strangeness.
Date: Thu, 31 Aug 2000 17:48:13 +0200
Hello,
First able, please forgive me if I'm in the wrong newsgroup, I browsed
most of the related on Linux+kernel newsgroups and I guess yours fitted
well with my problem.
Here it is :
I use a 2.2.16 kernel, and I'm using *very large* applications (using
more than 900MB). I just received a new 2GB machine hoping I could use
it under Linux for my large applications. I compiled 2.2.16 kernel with
2GB memory support, with and without SMP (just in case, since it's a SMP
machine), and the same problem occurs : My app can't allocate memory
when it becomes large (More than 500 MB).
My machine is configured as below :
- Kernel : 2.2.16, all defaults except Mylex DAC960 support, 2GB support
and eepro100 as module.
- Debian 2.2 distrib.
- Swap file 1GB.
- noticeable deamons running mysqld, sshd (OpenSSH).
To check at wich level memory allocation is stopped for user apps, I
made a memory-eater app (A while loop 'malloc'ing 1MB blocks and
stopping as soon as it can't allocate anymore memory).
The results are the following :
- Stopped with 548MB allocated for 2.2.16 / 2GB support
- Stopped with 882MB allocated for 2.2.16 / 1GB support
I tried with a 2.2.15 with the same results.
I stopped my deamons... Same result.
ulimit -a gave :
core file size (blocks) 0
data seg size (kbytes) unlimited
file size (blocks) unlimited
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files 1024
pipe size (512 bytes) 8
stack size (kbytes) 8192
cpu time (seconds) unlimited
max user processes 256
virtual memory (kbytes) unlimited
What did I miss?
Thanks in advance,
- Olivier CARRERE
------------------------------
From: Daniel Norton <[EMAIL PROTECTED]>
Subject: Re: Detecting applications faults
Date: Thu, 31 Aug 2000 11:33:20 -0400
Rosimildo da Silva wrote:
> Josef Moellers wrote:
> >
> > I guess, what Rosimildo is after is a technique to supervise any
> > application, not necessarily the ones he has written himself.
> >
>
> True. I'd ilke to have the OS monitoring all applications running,
> and let me know if something went wrong with one of them.
I have a similar requirement. Windows NT has "System DLLs" that will
load with every application -- the application doesn't need to
explicitly reference the DLL. That would do the trick. Does Linux's
shared libraries have something like this?
NT also has a way of trapping/filtering system calls. If Linux has
something similar, is there a system call that is invoked on a core
dump?
--
Daniel Norton
p.s. If you're a Linux development consultant and have particular
expertise in this area, send me E-mail.
------------------------------
From: Daniel Norton <[EMAIL PROTECTED]>
Subject: Re: Detecting applications faults
Date: Thu, 31 Aug 2000 11:31:41 -0400
Rosimildo da Silva wrote:
> Josef Moellers wrote:
> >
> > I guess, what Rosimildo is after is a technique to supervise any
> > application, not necessarily the ones he has written himself.
> >
>
> True. I'd ilke to have the OS monitoring all applications running,
> and let me know if something went wrong with one of them.
I have a similar requirement. Windows NT has "System DLLs" that will
load with every application -- the application doesn't need to
explicitly reference the DLL. That would do the trick. Does Linux's
shared libraries have something like this?
NT also has a way of trapping/filtering system calls. If Linux has
something similar, is there a system call that is invoked on a core
dump?
--
Daniel Norton
p.s. If you're a Linux development consultant and have particular
expertise in this area, send me E-mail.
------------------------------
From: "Rafael Porcel" <[EMAIL PROTECTED]>
Subject: lexmark 2050
Date: Thu, 31 Aug 2000 16:52:44 +0200
I need a driver for Lexmark 2050.
Thanks. Rafael
------------------------------
From: Henry_Barta <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: (YASP) Seagate Barracuda (ST318416W) Incompatibility
Date: 31 Aug 2000 17:07:04 GMT
In comp.os.linux.hardware Henry_Barta <[EMAIL PROTECTED]> wrote:
> There seem to be others experiencing the same problem, so it
> does not appear to be a sample defect with the drive.
A Deja search turned up a post with the URL for a site set up
by the maintainer of the aic7xxx driver. I downloaded and
applied the patches necessary to take my version of the driver
to his most recent version and that fixed the problem for me.
--
Hank Barta White Oak Software Inc.
[EMAIL PROTECTED] Predictable Systems by Design.(tm)
Beautiful Sunny Winfield, Illinois
------------------------------
** 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
******************************