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] [day] [month] [year] [list]
Message-ID: <20251222120459.644e50ee@gandalf.local.home>
Date: Mon, 22 Dec 2025 12:04:59 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: 高翔 <gaoxiang17@...omi.com>
Cc: Christian König <christian.koenig@....com>, Xiang Gao
 <gxxa03070307@...il.com>, "sumit.semwal@...aro.org"
 <sumit.semwal@...aro.org>, "mhiramat@...nel.org" <mhiramat@...nel.org>,
 "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
 "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 "mathieu.desnoyers@...icios.com" <mathieu.desnoyers@...icios.com>,
 "dhowells@...hat.com" <dhowells@...hat.com>, "kuba@...nel.org"
 <kuba@...nel.org>, "brauner@...nel.org" <brauner@...nel.org>,
 "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
 "linux-trace-kernel@...r.kernel.org" <linux-trace-kernel@...r.kernel.org>
Subject: Re: [External Mail]Re: [PATCH v8] dma-buf: add some tracepoints to
 debug.

On Mon, 22 Dec 2025 01:41:28 +0000
高翔 <gaoxiang17@...omi.com> wrote:

> > there was some whitespace issues with the macro.  
> 
> I check the patch with checkpatch.pl, couldn't find whitespace issues.
> 


> > +DECLARE_EVENT_CLASS(dma_buf,
> > +
> > +     TP_PROTO(struct dma_buf *dmabuf),
> > +
> > +     TP_ARGS(dmabuf),
> > +
> > +     TP_STRUCT__entry(
> > +             __string(exp_name, dmabuf->exp_name)
> > +             __field(size_t, size)
> > +             __field(ino_t, ino)
> > +     ),

These don't follow checkpatch recommendations for whitespace, because they
are "special". Please update these to look more like a structure:

     TP_STRUCT__entry(
             __string(	exp_name,		dmabuf->exp_name)
             __field(	size_t,			size)
             __field(	ino_t,			ino)
     ),


> > +
> > +     TP_fast_assign(
> > +             __assign_str(exp_name);
> > +             __entry->size = dmabuf->size;
> > +             __entry->ino = dmabuf->file->f_inode->i_ino;
> > +     ),
> > +
> > +     TP_printk("exp_name=%s size=%zu ino=%lu",
> > +               __get_str(exp_name),
> > +               __entry->size,
> > +               __entry->ino)
> > +);
> > +
> > +DECLARE_EVENT_CLASS(dma_buf_attach_dev,
> > +
> > +     TP_PROTO(struct dma_buf *dmabuf, struct dma_buf_attachment *attach,
> > +             bool is_dynamic, struct device *dev),
> > +
> > +     TP_ARGS(dmabuf, attach, is_dynamic, dev),
> > +
> > +     TP_STRUCT__entry(
> > +             __string(dev_name, dev_name(dev))
> > +             __string(exp_name, dmabuf->exp_name)
> > +             __field(size_t, size)
> > +             __field(ino_t, ino)
> > +             __field(struct dma_buf_attachment *, attach)
> > +             __field(bool, is_dynamic)
> > +     ),

Same here too:

     TP_STRUCT__entry(
             __string(	dev_name,			dev_name(dev))
             __string(	exp_name,			dmabuf->exp_name)
             __field(	size_t,				size)
             __field(	ino_t,				ino)
             __field(	struct dma_buf_attachment *,	attach)
             __field(	bool,				is_dynamic)
     ),


> > +
> > +     TP_fast_assign(
> > +             __assign_str(dev_name);
> > +             __assign_str(exp_name);
> > +             __entry->size = dmabuf->size;
> > +             __entry->ino = dmabuf->file->f_inode->i_ino;
> > +             __entry->is_dynamic = is_dynamic;
> > +             __entry->attach = attach;
> > +     ),
> > +
> > +     TP_printk("exp_name=%s size=%zu ino=%lu attachment:%p is_dynamic=%d dev_name=%s",
> > +               __get_str(exp_name),
> > +               __entry->size,
> > +               __entry->ino,
> > +               __entry->attach,
> > +               __entry->is_dynamic,
> > +               __get_str(dev_name))
> > +);
> > +
> > +DECLARE_EVENT_CLASS(dma_buf_fd,
> > +
> > +     TP_PROTO(struct dma_buf *dmabuf, int fd),
> > +
> > +     TP_ARGS(dmabuf, fd),
> > +
> > +     TP_STRUCT__entry(
> > +             __string(exp_name, dmabuf->exp_name)
> > +             __field(size_t, size)
> > +             __field(ino_t, ino)
> > +             __field(int, fd)
> > +     ),

And the above.

-- Steve

> > +
> > +     TP_fast_assign(
> > +             __assign_str(exp_name);
> > +             __entry->size = dmabuf->size;
> > +             __entry->ino = dmabuf->file->f_inode->i_ino;
> > +             __entry->fd = fd;
> > +     ),
> > +
> > +     TP_printk("exp_name=%s size=%zu ino=%lu fd=%d",
> > +               __get_str(exp_name),
> > +               __entry->size,
> > +               __entry->ino,
> > +               __entry->fd)
> > +);
> > +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ