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]
Date:   Wed, 9 Nov 2022 13:16:02 +0530
From:   Deepak R Varma <drv@...lo.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     outreachy@...ts.linux.dev, Sven Van Asbroeck <TheSven73@...il.com>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] staging: fieldbus: replace snprintf in show functions
 with sysfs_emit

On Wed, Nov 09, 2022 at 08:30:26AM +0100, Greg Kroah-Hartman wrote:
> On Wed, Nov 09, 2022 at 11:26:52AM +0530, Deepak R Varma wrote:
> > The show() methods should only use sysfs_emit() when formatting values
> > to be returned to the user space.
> > Ref: Documentation/filesystems/sysfs.rst
> > Issue identified by coccicheck.
> >
> > Signed-off-by: Deepak R Varma <drv@...lo.com>
> >  	/*
> > -	 * card_name was provided by child driver, could potentially be long.
> > -	 * protect against buffer overrun.
> > +	 * sysfs provides PAGE_SIZE long buffer to take care of potentially
>
> No need to ever mention PAGE_SIZE at all, this comment should just be:
> 	/* card_name was provided by child driver */

Sure. I will update the comment in the revision.

>
> But the larger question is, why did you only convert one of the sysfs
> show functions in this file?  Why not do them all?

I was limiting it to what is reported by coccicheck. I will review other such
show functions and send a consolidated patch.

Thank you,
./drv

>
> thanks,
>
> greg k-h
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ