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: <20220811094458.17dc1a6e@gandalf.local.home>
Date:   Thu, 11 Aug 2022 09:44:58 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Oded Gabbay <ogabbay@...nel.org>
Cc:     linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
        Ohad Sharabi <osharabi@...ana.ai>
Subject: Re: [PATCH 1/3] habanalabs: define trace events

On Thu, 11 Aug 2022 14:39:51 +0300
Oded Gabbay <ogabbay@...nel.org> wrote:

> +DECLARE_EVENT_CLASS(habanalabs_mmu_template,
> +	TP_PROTO(struct device *dev, u64 virt_addr, u64 phys_addr, u32 page_size, bool flush_pte),
> +
> +	TP_ARGS(dev, virt_addr, phys_addr, page_size, flush_pte),
> +
> +	TP_STRUCT__entry(
> +		__string(dname, dev_name(dev))
> +		__field(u64, virt_addr)
> +		__field(u64, phys_addr)
> +		__field(u32, page_size)
> +		__field(u8, flush_pte)
> +	),
> +
> +	TP_fast_assign(
> +		__assign_str(dname, dev_name(dev));
> +		__entry->virt_addr = virt_addr;
> +		__entry->phys_addr = phys_addr;
> +		__entry->page_size = page_size;
> +		__entry->flush_pte = flush_pte ? 1 : 0;

I think you can just have:

		__entry->flush_pte = flush_pte;

as I believe the C standard states that bool is saved as an integer '1' for
'true' and '0' for 'false'.

> +	),
> +

> +	TP_printk("%s: vaddr: %#llx, paddr: %#llx, psize: %#x, flush: %u",

If you want this to be a bit nicer looking, you could have "flush: %s",

> +		__get_str(dname),
> +		__entry->virt_addr,
> +		__entry->phys_addr,
> +		__entry->page_size,
> +		__entry->flush_pte)

And here: __entry->flush_pte ? "true" : "false")

Other than this, from a tracing point of view:

Reviewed-by: Steven Rostedt (Google) <rostedt@...dmis.org>

-- Steve


> +);
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ