Results 1 to 10 of 10

Thread: adding a new system call

  1. #1
    Join Date
    May 2012
    Beans
    14

    adding a new system call

    hi,

    I am trying to add a new custom system call to my kernel.
    kernel version 3.4.0.
    can anyone give a detailed step by step instruction on how to do it.

  2. #2
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: adding a new system call

    Not exactly a task for an absolute beginner?

    Thread moved to Programming Talk.
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  3. #3
    Join Date
    Jan 2010
    Location
    Sydney, Australia
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: adding a new system call

    You can find the below links useful , however it assumes you are familiar with bulding kernel .
    http://www.cs.brynmawr.edu/cs355/how...ystemcall.html
    http://tldp.org/HOWTO/html_single/Im...inux-2.6-i386/
    “Progress is made by lazy men looking for easier ways to do things”
    — Robert A. Heinlein

  4. #4
    Join Date
    May 2012
    Beans
    14

    Re: adding a new system call

    hi,
    sorry for posting it in the absolute beginner.I am not a beginner.And i got how to do it.thanks

  5. #5
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: adding a new system call

    Quote Originally Posted by glugT View Post
    hi,
    sorry for posting it in the absolute beginner.I am not a beginner.And i got how to do it.thanks
    Were the links provided by codemaniac any help?
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  6. #6
    Join Date
    Aug 2007
    Beans
    190
    Distro
    Ubuntu

    Re: adding a new system call

    sorry for stepping by - You do realise that this thread will step over in searches for "how to add a new custom system call to Linux kernel"?

    So if you found an immediate and nice solution: it is too much to ask you to share it with us?

    Thanks!

  7. #7
    Join Date
    May 2012
    Beans
    14

    Re: adding a new system call

    hi,

    I would love to share it.

    let the place where you downloaded the kernel be called linux-3.4

    First add the system call code to linux-3.4/fs/open.c

    and then add your system call number and name in the file syscall_32.tbl which will be in linux-3.4/arch/x86/syscalls/syscall_32.tbl

    then build your kernel and boot into it.

  8. #8
    Join Date
    May 2012
    Beans
    14

    Re: adding a new system call

    Quote Originally Posted by lisati View Post
    Were the links provided by codemaniac any help?

    I guess they were for older kernels.I had tried them before.I may have made errors too but they did not seem to work for me.

  9. #9
    Join Date
    Jan 2010
    Location
    Sydney, Australia
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: adding a new system call

    Quote Originally Posted by glugT View Post
    I guess they were for older kernels.I had tried them before.I may have made errors too but they did not seem to work for me.
    It was there just to get you started with the basics .
    Can you share the errors you are getting while you compile ?
    “Progress is made by lazy men looking for easier ways to do things”
    — Robert A. Heinlein

  10. #10
    Join Date
    May 2012
    Beans
    14

    Re: adding a new system call

    Quote Originally Posted by codemaniac View Post
    It was there just to get you started with the basics .
    Can you share the errors you are getting while you compile ?

    The directories and files mentioned were not present in my kernel.the paths were different and in some files were not present.

    So the method i had mentioned worked.To add systems call in older kernels like 2.6 leads to many make errors.gcc 4.6 compilers are not compatible with older kernels

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •