Hi!

As some of you remember my partner and I have worked on implementing a
TCP/IP Noise Simulator for Linux 2.4.x. Now, the simulator uses or
replaces the IP-Queue mechanism of IP-Tables, and can be run as a kernel
module or a standalone userland application.

We noticed our kernel module OOPSified kernels that used the new VM by
Andrea Archanageli, and we assumed it was still buggy, so we sticked with
the older one (which is by Rik van Riel IIRC). Now, in the last IGLU
meeting I had a talk with Moshe Bar who said, that it was not supposed to
work.

The reason is that we used kmalloc and if we don't touch the buffer we
allocated for a long time, and then tried to access a pointer to a 5th or
greater page after its start, it is not guaranteed to succeed.

<rant>
kmalloc is supposed to be similar to the malloc() userland function, which
gives you a dynamically allocated buffer for life. Why does not kmalloc
behaves that way in the new VM? Would it not break compatibility with many
third-party modules, like our own?
</rant>

OK - now for a solution. I suppose I can replace kmalloc by any of the
other kernel memory allocation mechanisms. Rubini and Corbet mention quite
a few in the relevant chapter in Linux Device Drivers:

http://www.xml.com/ldd/chapter/book/ch07.html

But I don't really know what to choose. We will need to build an
abstraction for it, that will default to malloc in user-land, but that's a
lesser problem.

Can anybody clarify this situation?

Regards,

        Shlomi Fish




----------------------------------------------------------------------
Shlomi Fish        [EMAIL PROTECTED]
Home Page:         http://t2.technion.ac.il/~shlomif/
Home E-mail:       [EMAIL PROTECTED]

"Let's suppose you have a table with 2^n cups..."
"Wait a second - is n a natural number?"


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to