new syscall implementing

0

0xFF

Guest
Hi everyone! I've implemented new syscall in 3.0.68 kernel in the following way:
1) add name to /arch/x86/ia32/ia32_entry.S (.quad sys_mycall)
2) then add its number to /arch/x86/include/asm/unistd_32.h (__NR_mycall 347)
3) increase __NR_syscalls by 1 in the same header - now it is 348
4) add it prototype to /include/linux/syscalls.h as asmlinkage long sys_mycall(int param);
5) implement it source in /kernel/time.c as SYSCALL_DEFINE1(mycall,int,param) {/*bla bla bla*/}

then build and install new kernel, this syscall was added to System map file of this kernel in /boot, but when i'm trying to call it like syscall(347,1) it returns -1 and errno is ENOSYS - syscall not implemented. What's wrong? Thank you:)
 


0

0xFF

Guest
problem was solved, syscall name must be added to the syscall table file in include directory instead of ia32_entry.S
 


Members online


Top