From: Mathieu Desnoyers Linux Kernel Markers Documentation - fix Fixes from Randy's comments. Signed-off-by: Mathieu Desnoyers Cc: "Randy.Dunlap" Signed-off-by: Andrew Morton --- Documentation/marker.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff -puN Documentation/marker.txt~linux-kernel-markers-documentation-fix Documentation/marker.txt --- a/Documentation/marker.txt~linux-kernel-markers-documentation-fix +++ a/Documentation/marker.txt @@ -18,7 +18,7 @@ code is reached. They can be used for tracing (LTTng, LKET over SystemTAP), overall performance accounting (SystemTAP). They could also be used to implement -efficient hooks for SELinux or any other subsystem the would have this +efficient hooks for SELinux or any other subsystem that would have this kind of need. Using the markers for system audit (SELinux) would require to pass a @@ -30,8 +30,9 @@ variable by address that would be later MARK(subsystem_event, "%d %s %p[struct task_struct]", someint, somestring, current); Where : -- Subsystem is the name of your subsystem. -- event is the name of the event to mark. +- subsystem_event is an identifier unique to your event + - subsystem is the name of your subsystem. + - event is the name of the event to mark. - "%d %s %p[struct task_struct]" is the formatted string for (printk-style). - someint is an integer. - somestring is a char pointer. @@ -39,7 +40,7 @@ Where : The expression %p[struct task_struct] is a suggested marker definition standard that could eventually be used for pointer type checking in -sparse. The brackets contain the type to which the pointer refer. +sparse. The brackets contain the type to which the pointer refers. The marker mechanism supports multiple instances of the same marker. Markers can be put in inline functions, inlined static functions and @@ -104,8 +105,8 @@ static int __init probe_init(void) { int result; result = marker_set_probe("subsystem_event", - FS_CLOSE_FORMAT, - probe_fs_close); + SUBSYSTEM_EVENT_FORMAT, + probe_subsystem_event); if (!result) goto cleanup; return 0; _