Hello All,

I am building a kernel module which performs the same task
to a user-level process as the 'ioperm' system call does to a root
process, giving permission to a process to access the IO ports
directly. I am
having problems in making my module work. As my module is not able to
find 'init_tss'. I am having the following line of code in my module:

struct tss_struct *tss = init_tss + smp_processor_id();

I included all the header files that need to be included just as done
in ioperm call. When I tried to load my module, I get an error
'unresolved symbol
init_task'. I looked into kernel source in '/usr/src/...' and found
that this
'init_tss' is defined as "/usr/src/linux/arch/i386/kernel/init_task.c"
as the following:

struct tss_struct init_tss[NR_CPUS] __cacheline_aligned = { [0 ...

How do I include something that is defined in a 'C' file ( in this
case 'init_tss') in the kernel source tree ? Will including the
'init_task.o' work ?? I tried to look into the Kernel symbol table to
find it but couldn't
find any.

Can anyone help me with this linking problem ? Can I use 'init_tss'
in my module or not ?? If so, do I need to add any special linking
when I complie my module or when I load it?? Any references are also

Thank you,