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: <1385133890.1747.101.camel@leonhard>
Date:	Sat, 23 Nov 2013 00:24:50 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	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>,
	Steven Rostedt <rostedt@...dmis.org>,
	David Ahern <dsahern@...il.com>,
	"Martin K. Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH 12/22] tools lib traceevent: Add scsi plugin

2013-11-21 (목), 12:01 +0100, Jiri Olsa:
> Adding scsi plugin.
> 
> This plugin adds fields resolving fucntions for following
> tracepoint events:
>   scsi:scsi_dispatch_cmd_start
>   scsi:scsi_dispatch_cmd_error
>   scsi:scsi_dispatch_cmd_done
>   scsi:scsi_dispatch_cmd_timeout
> 
> The diff of 'perf script' output generated by old and new code:
> (data was generated by 'perf record -e 'scsi:scsi_dispatch_cmd*' -a)
> 
> -         swapper     0 [000]  6620.491019: scsi:scsi_dispatch_cmd_done: [FAILED TO PARSE] host_no=0 channel=0 id=0 lun=0 result=0 opcode=53 cmd_len=10 data_sglen=0 prot_sglen=0 prot_op=0 cmnd=5
> +         swapper     0 [000]  6620.491019: scsi:scsi_dispatch_cmd_done: host_no=0 channel=0 id=0 lun=0 data_sgl=0 prot_sgl=0 prot_op=SCSI_PROT_NORMAL cmnd=(SYNCHRONIZE_CACHE - raw=35 00 00 00 00 00 00 00 00 00) result=(driver=DRIVER_OK host=DID_OK message=COMMAND_COMPLETE status=SAM_STAT_GOOD)
> -     kworker/0:0 21554 [000]  6620.491126: scsi:scsi_dispatch_cmd_start: [FAILED TO PARSE] host_no=0 channel=0 id=0 lun=0 opcode=42 cmd_len=10 data_sglen=1 prot_sglen=0 prot_op=0 cmnd=*
> +     kworker/0:0 21554 [000]  6620.491126: scsi:scsi_dispatch_cmd_start: host_no=0 channel=0 id=0 lun=0 data_sgl=1 prot_sgl=0 prot_op=SCSI_PROT_NORMAL cmnd=(WRITE_10 lba=570899168 txlen=8 protect=0 raw=2a 00 22 07 3a e0 00 00 08 00)
> -     jbd2/dm-3-8   593 [002]  6621.607992: scsi:scsi_dispatch_cmd_error: [FAILED TO PARSE] host_no=0 channel=0 id=0 lun=0 rtn=4182 opcode=53 cmd_len=10 data_sglen=0 prot_sglen=0 prot_op=0 cmnd=5
> +     jbd2/dm-3-8   593 [002]  6621.607992: scsi:scsi_dispatch_cmd_error: host_no=0 channel=0 id=0 lun=0 data_sgl=0 prot_sgl=0 prot_op=SCSI_PROT_NORMAL cmnd=(SYNCHRONIZE_CACHE - raw=35 00 00 00 00 00 00 00 00 00) rtn=4182
> 
> NOTE I couldn't generated scsi_dispatch_cmd_timeout tracepoint,
>      but it's similar to the rest, so I believe it's ok.

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


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