hi, Well, no. when you are doing a syscall from user space, the syscall parameters are in segment register fs (assuming x86). The functions memcpy_fromfs and memcpy_tofs are called in kernel to retrieve the parameters for kernel function. but module code is kernel code anyway, and can't do that. (Segmentation fault....) (try rewriting the syscall, but reference kernel memory for parameters.) If you want to call kernel-internal-functions from your module code, (which is not exported normally) you should register it into file linux/kernel/ksyms.c this will export that function's name and insmod will install your module. Sorry for typos and mistakes, if any. |