lkml.org 
[lkml]   [2011]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: Intercepting system calls
    Hello Jiri

    On Fri, Dec 23, 2011 at 3:17 PM, Jiri Kosina <jkosina@suse.cz> wrote:
    > On Thu, 22 Dec 2011, Gaurav Saxena wrote:
    >
    >> I am writing an application for which I need to intercept some
    >> filesystem system calls eg. unlink. I need unlink to call my code
    >> before deleting abc so that I could probably prevent unlink . I would
    >> like to implement this in a kernel module instead of modifying kernel
    >> code itself. I would like to intercept system calls by replacing
    >> system calls but I have not been able to find any method of doing that
    >> in linux > 3.0. Please suggest some method of doing that.
    >
    > Write a kernel module that instruments sys_unlink() via krpobes. See
    > Documentation/kprobes.txt for details.
    Ok. I am looking at its details, will try that. But how could a probe
    prevent execution of a system call?
    >
    > --
    > Jiri Kosina
    > SUSE Labs
    >



    --
    Thanks and Regards ,
    Gaurav


    \
     
     \ /
      Last update: 2011-12-23 10:53    [W:0.022 / U:95.236 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site