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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 23 Nov 2013 04:25:29 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Jiri Olsa <jolsa@...hat.com>, linux-kernel@...r.kernel.org,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	David Ahern <dsahern@...il.com>,
	"Martin K. Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH 12/22] tools lib traceevent: Add scsi plugin

On Sat, 23 Nov 2013 00:24:50 +0900
Namhyung Kim <namhyung@...nel.org> wrote:


> [SNIP]
> > +static const char *
> > +scsi_trace_rw6(struct trace_seq *p, unsigned char *cdb, int len)
> > +{
> > +	const char *ret = p->buffer + p->len;
> > +	sector_t lba = 0, txlen = 0;
> > +
> > +	lba |= ((cdb[1] & 0x1F) << 16);
> > +	lba |=  (cdb[2] << 8);
> > +	lba |=   cdb[3];
> > +	txlen = cdb[4];
> > +
> > +	trace_seq_printf(p, "lba=%llu txlen=%llu",
> > +			 (unsigned long long)lba, (unsigned long long)txlen);
> > +	trace_seq_putc(p, 0);
> 
> Why is this _putc(0) needed?  It seems you added it to all other
> functions too.

This is because these are copied directly from the kernel, and the
kernel versions use the putc(0) too. But there, it is needed, as its up
to the helper function to terminate the trace_seq.

I need to add trace_seq_terminate() in the kernel (it's in
libtraceevent), so that we can replace the putc(0) with terminate, and
not truncate the seq early.

-- Steve


> 
> 
> > +	return ret;
> > +}
> > +
> 
> 

--
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