Re: Intercepting VFS calls
From: Jan Kara
Date: Thu Jun 23 2005 - 08:42:27 EST
> Frederik Deweerdt wrote:
>
> > Le 20/06/05 12:37 +0200, Przemyslaw Sowa écrivit:
> >
> >
> >> Hello,
> >>
> >> I'd like to intercept VFS calls like read() and write() in 2.6
> kernels but I'm new in kernel development and I don't know how to do
> it.
> >>
> >> Could you help me, please?
> >>
> >>
> >
> > You could have a look at kprobes.
> > Regards,
> > Frederik Deweerdt
> >
> >
> >
> Thank you for the answer, but I need some way to execute my own
> function (from a module) instead of read(), wrte()... and I don't want
> to use any kernel patch. Is it possible?
It's impossible without patching the kernel. Why do you want to
intercept the calls? Isn't it enough to intercept the system calls? Then
you can do it from the userspace by tracing the process.
Honza
--
Jan Kara <jack@xxxxxxx>
SuSE CR Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/