Hi, I want to implement a system call as explained in Linux kernel development by Robert Love. He does three things adding entry to entry.S adding entry to asm/unistd.h and adding the system call code to sched.c and then make + make install I do not want to implement for all architectures but only for my PC which is 64 bit. I am not able to locate files entry. S and unistd.h which he is telling in his tutorial. Please help me out to figure out the exact steps. Please also mention the linux kernel version I should use. Nitin
On Thu, Apr 7, 2016 at 9:23 AM, Nitin Varyani <varyani.nitin1@gmail.com> wrote:
Hi, I want to implement a system call as explained in Linux kernel development by Robert Love.
He does three things adding entry to entry.S adding entry to asm/unistd.h and adding the system call code to sched.c
and then make + make install
I do not want to implement for all architectures but only for my PC which is 64 bit. I am not able to locate files entry. S and unistd.h which he is telling in his tutorial. Please help me out to figure out the exact steps. Please also mention the linux kernel version I should use.
Not sure if that is still applicable but you could refer to this recent example: https://lkml.org/lkml/2016/3/31/1109
Hi Nitin, Take a look at this link, it'll give you a start: http://blog.techveda.org/adding-system-calls-linux-kernel-3-5-x/ On Wed, Apr 6, 2016 at 11:23 PM, Nitin Varyani <varyani.nitin1@gmail.com> wrote:
Hi, I want to implement a system call as explained in Linux kernel development by Robert Love.
He does three things adding entry to entry.S adding entry to asm/unistd.h and adding the system call code to sched.c
and then make + make install
I do not want to implement for all architectures but only for my PC which is 64 bit. I am not able to locate files entry. S and unistd.h which he is telling in his tutorial. Please help me out to figure out the exact steps. Please also mention the linux kernel version I should use.
Nitin
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Nitin On Thu, Apr 7, 2016 at 11:53 AM, Nitin Varyani <varyani.nitin1@gmail.com> wrote:
Hi, I want to implement a system call as explained in Linux kernel development by Robert Love.
He does three things adding entry to entry.S adding entry to asm/unistd.h and adding the system call code to sched.c
and then make + make install
I do not want to implement for all architectures but only for my PC which is 64 bit. I am not able to locate files entry. S and unistd.h which he is telling in his tutorial. Please help me out to figure out the exact steps. Please also mention the linux kernel version I should use.
Please refer this. I wrote this quite a while back but should be good to go. http://codewithkernel.blogspot.my/2014/06/adding-new-system-call-in-linux-x8...
Nitin
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- ---P.K.S
Neither of the solution is working. @ Pranay: kernel is not booting after making the changes you have mentioned. somethings like "dropping to shell initramfs:" is displayed on booting. On Thu, Apr 7, 2016 at 1:08 PM, Pranay Srivastava <pranjas@gmail.com> wrote:
Nitin
On Thu, Apr 7, 2016 at 11:53 AM, Nitin Varyani <varyani.nitin1@gmail.com> wrote:
Hi, I want to implement a system call as explained in Linux kernel
development by Robert Love.
He does three things adding entry to entry.S adding entry to asm/unistd.h and adding the system call code to sched.c
and then make + make install
I do not want to implement for all architectures but only for my PC
which is 64 bit. I am not able to locate files entry. S and unistd.h which he is telling in his tutorial.
Please help me out to figure out the exact steps. Please also mention the linux kernel version I should use.
Please refer this. I wrote this quite a while back but should be good to go.
http://codewithkernel.blogspot.my/2014/06/adding-new-system-call-in-linux-x8...
Nitin
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- ---P.K.S
Hi Nitin On Sat, Apr 9, 2016 at 5:03 PM, Nitin Varyani <varyani.nitin1@gmail.com> wrote:
Neither of the solution is working. @ Pranay: kernel is not booting after making the changes you have mentioned. somethings like "dropping to shell initramfs:" is displayed on booting.
I don't think this is related to the changes you made. I would advise you just build the sources for your distro and try to get to boot the kernel you compiled. Perhaps some steps you might have missed specific to your distro?
On Thu, Apr 7, 2016 at 1:08 PM, Pranay Srivastava <pranjas@gmail.com> wrote:
Nitin
On Thu, Apr 7, 2016 at 11:53 AM, Nitin Varyani <varyani.nitin1@gmail.com> wrote:
Hi, I want to implement a system call as explained in Linux kernel development by Robert Love.
He does three things adding entry to entry.S adding entry to asm/unistd.h and adding the system call code to sched.c
and then make + make install
I do not want to implement for all architectures but only for my PC which is 64 bit. I am not able to locate files entry. S and unistd.h which he is telling in his tutorial. Please help me out to figure out the exact steps. Please also mention the linux kernel version I should use.
Please refer this. I wrote this quite a while back but should be good to go.
http://codewithkernel.blogspot.my/2014/06/adding-new-system-call-in-linux-x8...
Nitin
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- ---P.K.S
-- ---P.K.S
I have a 64 bit machine I am changing linux 3.5.4 source tree. I modified syscall_64.tbl I had put your code in linux_3.5.4/arch/x86/pks_first/pks_first_call.c Then, I created pks_first/Makefile Modified the arch/x86/Kbuild Modified include/linux/syscalls.h I ran "make menuconfig" and then simply exit. Then I ran "make" I saw that pks_first_call.o was created I then ran "make modules_install" "make install" After then I restarted my system and booted linux 3.5.4. But it was stuck half way. On Sat, Apr 9, 2016 at 7:39 PM, Pranay Srivastava <pranjas@gmail.com> wrote:
Hi Nitin
On Sat, Apr 9, 2016 at 5:03 PM, Nitin Varyani <varyani.nitin1@gmail.com> wrote:
Neither of the solution is working. @ Pranay: kernel is not booting after making the changes you have mentioned. somethings like "dropping to shell initramfs:" is displayed on booting.
I don't think this is related to the changes you made. I would advise you just build the sources for your distro and try to get to boot the kernel you compiled. Perhaps some steps you might have missed specific to your distro?
On Thu, Apr 7, 2016 at 1:08 PM, Pranay Srivastava <pranjas@gmail.com>
wrote:
Nitin
On Thu, Apr 7, 2016 at 11:53 AM, Nitin Varyani <
varyani.nitin1@gmail.com>
wrote:
Hi, I want to implement a system call as explained in Linux kernel development by Robert Love.
He does three things adding entry to entry.S adding entry to asm/unistd.h and adding the system call code to sched.c
and then make + make install
I do not want to implement for all architectures but only for my PC which is 64 bit. I am not able to locate files entry. S and unistd.h
which
he is telling in his tutorial. Please help me out to figure out the exact steps. Please also mention the linux kernel version I should use.
Please refer this. I wrote this quite a while back but should be good to go.
http://codewithkernel.blogspot.my/2014/06/adding-new-system-call-in-linux-x8...
Nitin
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- ---P.K.S
-- ---P.K.S
On Sat, Apr 9, 2016 at 7:51 PM, Nitin Varyani <varyani.nitin1@gmail.com> wrote:
I have a 64 bit machine
Before changing the source try to build, install and boot your kernel. I'm sure there are some extra steps you might need to perform to boot your compiled kernel. Which distro are you using? I used OpenSuse for this work.
I am changing linux 3.5.4 source tree.
I modified syscall_64.tbl I had put your code in linux_3.5.4/arch/x86/pks_first/pks_first_call.c
Then, I created pks_first/Makefile
Modified the arch/x86/Kbuild
Modified include/linux/syscalls.h
I ran "make menuconfig" and then simply exit.
Then I ran
"make"
I saw that pks_first_call.o was created
I then ran
"make modules_install" "make install"
After then I restarted my system and booted linux 3.5.4. But it was stuck half way.
On Sat, Apr 9, 2016 at 7:39 PM, Pranay Srivastava <pranjas@gmail.com> wrote:
Hi Nitin
On Sat, Apr 9, 2016 at 5:03 PM, Nitin Varyani <varyani.nitin1@gmail.com> wrote:
Neither of the solution is working. @ Pranay: kernel is not booting after making the changes you have mentioned. somethings like "dropping to shell initramfs:" is displayed on booting.
I don't think this is related to the changes you made. I would advise you just build the sources for your distro and try to get to boot the kernel you compiled. Perhaps some steps you might have missed specific to your distro?
On Thu, Apr 7, 2016 at 1:08 PM, Pranay Srivastava <pranjas@gmail.com> wrote:
Nitin
On Thu, Apr 7, 2016 at 11:53 AM, Nitin Varyani <varyani.nitin1@gmail.com> wrote:
Hi, I want to implement a system call as explained in Linux kernel development by Robert Love.
He does three things adding entry to entry.S adding entry to asm/unistd.h and adding the system call code to sched.c
and then make + make install
I do not want to implement for all architectures but only for my PC which is 64 bit. I am not able to locate files entry. S and unistd.h which he is telling in his tutorial. Please help me out to figure out the exact steps. Please also mention the linux kernel version I should use.
Please refer this. I wrote this quite a while back but should be good to go.
http://codewithkernel.blogspot.my/2014/06/adding-new-system-call-in-linux-x8...
Nitin
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- ---P.K.S
-- ---P.K.S
-- ---P.K.S
I am using Ubuntu On Sat, Apr 9, 2016 at 8:04 PM, Pranay Srivastava <pranjas@gmail.com> wrote:
On Sat, Apr 9, 2016 at 7:51 PM, Nitin Varyani <varyani.nitin1@gmail.com> wrote:
I have a 64 bit machine
Before changing the source try to build, install and boot your kernel. I'm sure there are some extra steps you might need to perform to boot your compiled kernel. Which distro are you using? I used OpenSuse for this work.
I am changing linux 3.5.4 source tree.
I modified syscall_64.tbl I had put your code in linux_3.5.4/arch/x86/pks_first/pks_first_call.c
Then, I created pks_first/Makefile
Modified the arch/x86/Kbuild
Modified include/linux/syscalls.h
I ran "make menuconfig" and then simply exit.
Then I ran
"make"
I saw that pks_first_call.o was created
I then ran
"make modules_install" "make install"
After then I restarted my system and booted linux 3.5.4. But it was stuck half way.
On Sat, Apr 9, 2016 at 7:39 PM, Pranay Srivastava <pranjas@gmail.com> wrote:
Hi Nitin
On Sat, Apr 9, 2016 at 5:03 PM, Nitin Varyani <varyani.nitin1@gmail.com
wrote:
Neither of the solution is working. @ Pranay: kernel is not booting after making the changes you have mentioned. somethings like "dropping to shell initramfs:" is displayed on booting.
I don't think this is related to the changes you made. I would advise you just build the sources for your distro and try to get to boot the kernel you compiled. Perhaps some steps you might have missed specific to your distro?
On Thu, Apr 7, 2016 at 1:08 PM, Pranay Srivastava <pranjas@gmail.com> wrote:
Nitin
On Thu, Apr 7, 2016 at 11:53 AM, Nitin Varyani <varyani.nitin1@gmail.com> wrote:
Hi, I want to implement a system call as explained in Linux
kernel
development by Robert Love.
He does three things adding entry to entry.S adding entry to asm/unistd.h and adding the system call code to sched.c
and then make + make install
I do not want to implement for all architectures but only for my PC which is 64 bit. I am not able to locate files entry. S and unistd.h which he is telling in his tutorial. Please help me out to figure out the exact steps. Please also mention the linux kernel version I should use.
Please refer this. I wrote this quite a while back but should be good to go.
http://codewithkernel.blogspot.my/2014/06/adding-new-system-call-in-linux-x8...
Nitin
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- ---P.K.S
-- ---P.K.S
-- ---P.K.S
participants (4)
-
Giedrius Statkevičius -
Nitin Varyani -
Pranay Srivastava -
Sharath Chandra