Find the answer to your Linux question:
Results 1 to 4 of 4
hello!!! evereone. i donīt know how to catch the system call when a file is opened. i wanna write a message when the kernel linux opens a file. thanks!!!...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2007
    Posts
    3

    catch files in the kernel


    hello!!! evereone.

    i donīt know how to catch the system call when a file is opened.
    i wanna write a message when the kernel linux opens a file.
    thanks!!!

  2. #2
    Linux User cyberinstru's Avatar
    Join Date
    Jan 2007
    Location
    India
    Posts
    362
    By being in the USER Space, it cannot be done. Since, kernel does such operations in KERNEL space.
    ---------------------------------
    Registered Linux User #440311
    HI2ARUN _AT_ GMAIL _DOT_ COM
    ---------------------------------

  3. #3
    Just Joined!
    Join Date
    Aug 2006
    Location
    india
    Posts
    57
    I am not completely clear with ur requirement
    please luk into man for "strace" whether it will serve ur purpose

  4. #4
    Linux Newbie dilbert's Avatar
    Join Date
    Sep 2006
    Location
    Yorkshire, GB
    Posts
    237
    Couldn't he write a fake kernel module, one of these "Hello World" examples, and load that as a module?

    Via ioctl calls the user app could communicate with that module. Only I don't know what message is there to catch in kernel space.
    Bus Error: Passengers dumped. Hech gap yo'q.

Posting Permissions

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