Hi guys.
I have downloaded kernel 2.6.38-5 to add a system call.
I did the following steps:
1. I have added my system call to system call table
Code:
<src folder>/arc/x86/kernel/syscall_table_32.S
.long sys_mycall
2. i have added the system cal number in
Code:
<src folder>/include/asm-generic/unistd.h
#define __NR_mycall 244
__SYSCALL(__NR_mycall, sys_mycall)
3. I have added the prototype to syscalls.h
Code:
<src follder>/include/linux/syscalls.h
asmlinkage long sys_mycall(long input);
4. here is my system call
Code:
asmlinkage long sys_mycall(long input)
{
return (input * 2);
}
5. I have edited the Makfiles too.
Now after compilation when i use it via syscall() it gives me "BAD ADDRESS" with errno set to 14.
What should i do?