public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Joe Perches <joe@perches.com>
Cc: linux-rdma <linux-rdma@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] mm: Use sysfs_emit functions not sprintf
Date: Wed, 7 Oct 2020 15:56:53 -0300	[thread overview]
Message-ID: <20201007185653.GZ5177@ziepe.ca> (raw)
In-Reply-To: <a334b30e7b617eb6b0ea22f2bf00e0f188c4ae42.camel@perches.com>

On Wed, Oct 07, 2020 at 11:04:42AM -0700, Joe Perches wrote:
> On Wed, 2020-10-07 at 09:53 -0300, Jason Gunthorpe wrote:
> > On Wed, Oct 07, 2020 at 12:16:01AM -0700, Kees Cook wrote:
> > > On Tue, Oct 06, 2020 at 09:28:17AM -0700, Joe Perches wrote:
> > > > Convert the various uses of sprintf/snprintf/scnprintf to
> > > > format sysfs output to sysfs_emit and sysfs_emit_at to make
> > > > clear the output is sysfs related and to avoid any possible
> > > > buffer overrun of the PAGE_SIZE buffer.
> > > > 
> > > > Done with cocci scripts and some typing.
> > > 
> > > Can you include the cocci script in the commit log? It might be nicer to
> > > split the "manual" changes from the cocci changes, as that makes review
> > > much easier too.
> > > 
> > > Regardless, yes, I'm a fan of switching these all around to
> > > sysfs_emit*(). :)
> > 
> > Yah, +1, I'd welcome patches for drivers/infiniband as well next cycle
> 
> The script to change <foo>_show(struct device *, ...)
> function uses of
> sprintf to sysfs_emit is attached.

> $ git diff --shortstat drivers/infiniband
>  25 files changed, 322 insertions(+), 303 deletions(-)
> 
> Because it touches a lot of drivers, the 'cc' list is
> pretty large for the diff.
> 
> Given the size of the cc list, unless there's a single
> acceptable patch, I will not submit individual patches as
> I really dislike the back and forth of this sub-maintainer
> will but this sub-maintainer will not apply a patch.

This size looks not too bad, we regularly do all driver updates. Up to
you if you want split per driver. In rdma land something like this
will go ahead unless someone points to technical errors in the
conversion.

Thanks,
Jason

      reply	other threads:[~2020-10-07 18:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 16:28 [PATCH -next] mm: Use sysfs_emit functions not sprintf Joe Perches
2020-10-07  7:16 ` Kees Cook
2020-10-07 12:53   ` Jason Gunthorpe
2020-10-07 18:04     ` Joe Perches
2020-10-07 18:56       ` Jason Gunthorpe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201007185653.GZ5177@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox