On 1/16/06, Miguel A Paraz <[EMAIL PROTECTED]> wrote:
> I have a kernel driver that allocates memory. I believe it uses
> kmalloc since that seems to be the only such function, but the actual
> code is hidden inside a binary-only module. The kernel interface has
> source.
>
> The problem is, in my app, the call fails when the kernel has already
> used some memory for aggressive disk caching.

Okay, since it's binary-only, it might be possible to kludge* it so
that calls to kmalloc() inside the binary object are routed to a
function of yours that does allocations differently (such as using a
different kernel memory allocator like vmalloc and such). Of course,
since it's binary-only, it's hard to predict what the effects of such
redirection are...

In any case, you can probe the kernel module in question using
objdump, and see what allocators it is calling (or at least, are
referenced):

objdump -t /path/to/driver.ko

You'd want to pipe that to less(1) or grep(1); in particular, look for
references to vmalloc or kmalloc.

==
* I do not advocate this kludge, even though I've used it in another
binary-only module that now doesn't work for the 2.6.x. Really. By the
way, if you're interested, the details of the kludge are at
http://www.livejournal.com/users/cyberlizard/87222.html ; YMMV and I
claim ABSOLUTELY NO WARRANTY on this working. ;)


--
JM Ibanez --

Book:   If you take sexual advantage of her, you're going to burn in a
        very special level of Hell, a level they reserve for child
        molesters and people who talk at the theater.
        (Firefly, "Our Mrs. Reynolds")
-----
http://www.livejournal.com/~jmibanez/
http://www.mycgiserver.com/~butiki/
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to