This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sys_write and system tap


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]