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: <20201007185653.GZ5177@ziepe.ca>
Date:   Wed, 7 Oct 2020 15:56:53 -0300
From:   Jason Gunthorpe <jgg@...pe.ca>
To:     Joe Perches <joe@...ches.com>
Cc:     linux-rdma <linux-rdma@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] mm: Use sysfs_emit functions not sprintf

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ