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]
Message-ID: <20180627163706.GA9361@localhost.localdomain>
Date:   Wed, 27 Jun 2018 10:37:06 -0600
From:   Keith Busch <keith.busch@...ux.intel.com>
To:     Johannes Thumshirn <jthumshirn@...e.de>
Cc:     Christoph Hellwig <hch@....de>, Sagi Grimberg <sagi@...mberg.me>,
        Keith Busch <keith.busch@...el.com>,
        James Smart <james.smart@...adcom.com>,
        Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>,
        Linux NVMe Mailinglist <linux-nvme@...ts.infradead.org>
Subject: Re: [PATCH v5 2/2] nvme: trace: add disk name to tracepoints

On Wed, Jun 27, 2018 at 02:53:24PM +0200, Johannes Thumshirn wrote:
>  	    TP_fast_assign(
> -		    __entry->qid = qid;
> +		    __assign_str(name, disk_name);
> +		    __entry->ctrl_id = nvme_req(req)->ctrl->cntlid;
> +		    __entry->qid = req->q->id;
>  		    __entry->opcode = cmd->common.opcode;
>  		    __entry->flags = cmd->common.flags;
>  		    __entry->cid = cmd->common.command_id;
> @@ -122,10 +130,10 @@ TRACE_EVENT(nvme_setup_nvm_cmd,
>  		    memcpy(__entry->cdw10, cmd->common.cdw10,
>  			   sizeof(__entry->cdw10));
>  	    ),
> -	    TP_printk("qid=%d, nsid=%u, cmdid=%u, flags=0x%x, meta=0x%llx, cmd=(%s %s)",
> -		      __entry->qid, __entry->nsid, __entry->cid,
> -		      __entry->flags, __entry->metadata,
> -		      show_opcode_name(__entry->opcode),
> +	    TP_printk("nvme%d: disk=%s, qid=%d, nsid=%u, cmdid=%u, flags=0x%x, meta=0x%llx, cmd=(%s %s)",
> +		      __entry->ctrl_id, __get_str(name), __entry->qid,
> +		      __entry->nsid, __entry->cid, __entry->flags,
> +		      __entry->metadata, show_opcode_name(__entry->opcode),
>  		      __parse_nvme_cmd(__entry->opcode, __entry->cdw10))
>  );

This looks a bit confusing to me. The ctrl->cntlid you're using in
__entry->ctrl_id isn't a unique value across subsystems, and it will
typically be 0 for all controllers that are the only controller in
their subsystem.

It looks like you want the # assigned to /dev/nvme<#>. Do you want to
use ctrl->instance here instead?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ