[lkml]   [1996]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectnamei() and opening files in the kernel

I'm trying to implement a pseudo-ethernet card using a character device-based
network interface being developed here at Cornell. I am trying to access the
character device file from within the kernel. Currently, I am trying to use
namei() to get the inode for the device. The namei() call appears to fail in a
call to find_vma(). I've been trying to trace the point of failure, but I
don't understand what the vma_find() code is doing. My general impression is
that it's trying to locate the supplied pathname in virtual memory, and it's
failing because it's already in kernel space.

I'm using the 1.3.71 kernel tree. Both the character and net drivers are implemented as modules.

My question is: am I doing something I shouldn't? If so, how should I be doing this? If not, any ideas about what I might be doing wrong?

I imagine I could make the ioctls public and access them directly, but it seems like I want to let the kernel know that I'm using the device and that I should, therefore, go through the formality of opening it explicitly. (Is it obvious that I really don't know what I'm doing? :)

Any hints, tips, tricks, advice, etc. would be greatly appreciated. (I've already read through the KHG, and it doesn't really seem to address this kind of thing.)

Thanks in advance,

 \ /
  Last update: 2005-03-22 13:37    [W:0.038 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site