Hi everyone. This is my very first post on these forums but this certainly looks like a nice place to bring my newbie questions

I've just started programming kernel modules. Currently I'm trying to write a Shared Watchdog Application where applications that share the same hw can register and be able to share a single hw watchdog.

I want the application to be transparent to the applications in user space and the hw watchdog so that I don't need to change that much code in the already existing applications.

If the user space application does an IOCTL on my module I want to perform some logic and then send it to the "real" watchdog module that resets the timer on the hw watchdog etc.

By doing it like this I came to the conclusion that I needed standard file operations like open, close, ioctl etc. First I used these but that resolved in compling errors (implicit declaration of function...). I then found the sys_open, sys_close and sys_ioctl functions that I tried to use instead. I got no compling errors _but_ I got unresolved symbols (except sys_close) when trying to insmod the module. When doing a cat on /proc/ksyms I found that just the, sys_close was known to the kernel. I then went into kernel/ksyms.c and exported sys_open and sys_close, recompiled the kernel and tried to insmod the module again. The unresolved symbol for sys_open went away but it left me with only sys_ioctl as a still unresolved symbol. I'm compling for a linux 2.4.20 kernel btw.

I don't know how to make it known to my kernel or if it's at all possible to make a LKM communicate with another LKM in this manner?

Maybe this is a terrible solution to what I wanted to achieve I don't know but at least, at first sight, it sounded better than my other idea of implementation which was to create a daemon in user space that used some sort of IPC to communicate with the other user space applications and then use the /proc filesystem to communicate with the kernel module. But from what I've seen of the proc file system it's mostly used by the kernel to communicate information to user space. But what do I know Maybe it's possible to do it like this as well?

Anyways, any help pointing me in the right direction would be greatly appreciated. The whole kernel hacking thing is all new to me so be gentle with me

Cheers!