This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: sys_write and system tap
- From: Martin Hunt <hunt at redhat dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: ihern009 at fiu dot edu, systemtap at sources dot redhat dot com
- Date: Thu, 08 Jun 2006 10:13:52 -0700
- Subject: Re: sys_write and system tap
- Organization: Red Hat Inc.
- References: <20060608064430.AFI03706@mailstore2.fiu.edu> <20060608115943.GG30816@redhat.com>
On Thu, 2006-06-08 at 07:59 -0400, Frank Ch. Eigler wrote:
> Hi -
>
> On Thu, Jun 08, 2006 at 06:44:30AM -0400, ihern009@fiu.edu wrote:
>
> > I've been doing some work with jprobes for some academic research
> > and everything is fine until I attempt to probe sys_write as
> > follows:
> >
> > asmlinkage ssize_t jsys_write(unsigned int fd, const char __user * buf, size_t count)
> > {
> > char * args_temp;
> > args_temp = kmalloc(15, GFP_ATOMIC);
> > vsnprintf(args_temp, 10, "%s", "hello\n");
You need to use snprintf() here. vsnprintf() takes a va_list instead of
a variable number of args.
Martin