howto add sys call using modules only ?

This is a discussion on howto add sys call using modules only ? within the Linux Programming forums, part of the Platform Specific Boards category; I am doing a small project in which i m designing a new system call to encrypt/decrypt files. My problem ...

  1. #1
    Registered User
    Join Date
    Jun 2005
    Posts
    1

    howto add sys call using modules only ?

    I am doing a small project in which i m designing a new system call
    to encrypt/decrypt files.

    My problem goes like this:

    1> Previously up until 2.4 , sys_call_table was exported by kernel
    and so obsolete sys call no. could be used to add our customised
    syscall.So patching around that obsolete sys call worked.

    2> I am designing on 2.6.5 and it doesnt export sys_call_table .
    So the obvious thing is to modify kernel sources and do development.
    But this would terribly slow down the work as I have to recompile
    again and again. I thought using modules is better.

    In order to export the sys_call_table in kernel 2.6 i added into the file arch/i386/kernel/i386_ksyms.c the following lines:
    extern void* sys_call_table[];
    EXPORT_SYMBOL(sys_call_table);

    But after recompile , the symbol unresolved problem continues
    when i run my module.

    I googled a lot but couldnt find worthy source. Could u suggest a workaround
    to add sys call using modules only ?

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    5
    try:
    http://mail.nl.linux.org/kernelnewbi.../msg00413.html
    I've tried the first version and I can use symbols but only inside the module I define the new_sys_call_table.
    Hope it works for you too. (I use kernel 2.4, I haven't tried in 2.6)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-07-2010, 11:08 PM
  2. Assembly Tutorials
    By JoshR in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 06-11-2005, 09:56 AM
  3. C system call and library call
    By Coconut in forum C Programming
    Replies: 6
    Last Post: 08-22-2002, 11:20 AM
  4. Assembly example
    By Lynux-Penguin in forum C Programming
    Replies: 6
    Last Post: 04-24-2002, 07:45 PM
  5. Pls help me to do this project in C I need source code
    By sureshmenon74 in forum C Programming
    Replies: 4
    Last Post: 10-04-2001, 06:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21