sys_write and system tap
Martin Hunt
hunt@redhat.com
Thu Jun 8 17:41:00 GMT 2006
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
More information about the Systemtap
mailing list