lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A8B5624.9040607@cn.fujitsu.com>
Date:	Wed, 19 Aug 2009 09:32:20 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	Josh Stone <jistone@...hat.com>
CC:	linux-kernel@...r.kernel.org, fweisbec@...il.com, mingo@...e.hu,
	laijs@...fujitsu.com, rostedt@...dmis.org, peterz@...radead.org,
	mathieu.desnoyers@...ymtl.ca, jiayingz@...gle.com,
	mbligh@...gle.com, Jason Baron <jbaron@...hat.com>
Subject: Re: [PATCH] tracing: Create generic syscall TRACE_EVENTs

Josh Stone wrote:
> This converts the syscall_enter/exit tracepoints into TRACE_EVENTs, so
> you can have generic ftrace events that capture all system calls with
> arguments and return values.
> 
> The existing event_syscall_enter/exit trace_event structs are renamed to
> event_sys_enter/exit, so they don't conflict with the names generated
> automatically by ftrace.
> 

It would be much better to see a sample output of these TRACE_EVENTs,

...

> +TRACE_EVENT_WITH_CALLBACK(syscall_enter,
> +
> +	TP_PROTO(struct pt_regs *regs, long id),
> +
> +	TP_ARGS(regs, id),
> +
> +	TP_STRUCT__entry(
> +		__field(	long,	id		)
> +		__array(	long,	args,	6	)
> +	),
> +
> +	TP_fast_assign(
> +		__entry->id	= id;
> +		syscall_get_arguments(current, regs, 0, 6, __entry->args);
> +	),
> +
> +	TP_printk("NR %ld (%ld, %ld, %ld, %ld, %ld, %ld)",
> +		  __entry->id,
> +		  __entry->args[0], __entry->args[1], __entry->args[2],
> +		  __entry->args[3], __entry->args[4], __entry->args[5]),
> +

so we'll see the what's the output if a syscall has less than 6 args.

And I guess it should be "(%lx, %lx, ..., %lx)"? Otherwise I think we'll
see some negative values.

> +	syscall_regfunc, syscall_unregfunc
> +);


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ