Adding a new system call in Linux kernel 3.3?

Up vote 1 down vote favorite 1 share g+ share fb share tw.

I am very new to this kernel thing. What I want to do is just add a new system call to the kernel. I was following this guideline: hekimian-williams.com/?p=20.

The problem is there used to syscall_table_32. S file under arch/x86/kernel, but I cannot find the file for x86 systems in kernel version 3.3. Do I still need to edit the file and append one more line for the newly added system call? Or do I need to do something else to let the kernel know about my new system call?

Any help will be appreciated. Thank you. Linux linux-kernel system-calls link|improve this question asked Apr 2 at 14:06romanEgloo327 75% accept rate.

I think in kernel 3.3 its shifted here lxr.free-electrons.com/source/arch/x86/s....

Sometime I wonder if there is anything you guys do not know.. ^^ – romanEgloo Apr 2 at 17:32.

For 64 bits OS get kernel codes from kernel.org. Wget http://kernel.org/pub/linux/kernel/v3.0/linux-3.3.1.tar. Bz2 Upzip it with command ‘tar xvfj XXX” to a folder For example : /root/kernel tar xvfj linux-3.3.1.tar.

Bz2 Edit file “/root/kernel/linux-3.3.1/arch/x86/syscalls/syscall_64. Tbl” Add new line 312 64 husky1 sys_husky1 Eidt file “/root/kernel/linux-3.3.1/include/linux/syscalls. H” Add new function declaration asmlinkage long sys_husky1(int fd); before the line “#endif” Add a new c file under “/root/kernel/linux-3.3.1/arch/x86/kernel” (I am using x86 CPU) Example : Edit “/root/kernel/linux-3.3.1/arch/x86/kernel/Makefile” Add a new line “obj-y += husky.

O” goto /root/kernel/linux-3.3.1 folder and run command “make –j8.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions