Skip to contentSkip to conversation

Intercepting VFS calls

DISCUSSION Przemyslaw Sowa 2 participants 2 messages Jun 20, 2005 – Jun 23, 2005

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines · Frederik Deweerdt

Le 20/06/05 12:37 +0200, Przemyslaw Sowa écrivit:

Quoted 3 lines

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.

Quoted 11 lines
Quoted 4 lines

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?

Best regards,
Przemyslaw Sowa

#1 lore raw
Quoted 21 lines
Quoted 6 lines · Frederik Deweerdt

Le 20/06/05 12:37 +0200, Przemyslaw Sowa écrivit:

Quoted 3 lines

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.

Quoted 11 lines
Quoted 4 lines

Could you help me, please?

You could have a look at kprobes.
Regards,
Frederik Deweerdt

Quoted 3 lines

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

Signature · 2 lines
Jan Kara <[email protected]>
SuSE CR Labs