Re: [PATCH] Generalized kernel hooks using LTT

From: Pavel Machek (pavel@ucw.cz)
Date: Wed May 17 2000 - 15:51:19 EST


Hi!

> You can now hook onto any traced kernel event using a
> simple function:
>
> trace_register_callback()
>
> The following module hooks onto network traffic:
> ------------------------------------------------------
> #define MODULE
> #include <linux/module.h>
> #include <linux/trace.h>
>
> int my_callback(uint8_t pmEventID, void* pmStruct)
~~~~~
> { printk("Something happened on the network \n");
> }

You should return some value, if your return type is int ;-).

> This is going to be helpfull to all you security freaks
> out there (me not included).

It would be much nicer if you allowed for denying things, where it
makes sense. Like packet came, callback returns 1, that means packet
gets dropped. App does syscall, callback returns 1, syscall is
denied. (I'm sorry if this is totally bad idea -- I did not look at
patch).

-- 
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents me at discuss@linmodems.org

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:16 EST