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: <2026020125-slighted-fountain-7fe3@gregkh>
Date: Sun, 1 Feb 2026 11:35:52 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Krishna Kurapati <krishna.kurapati@....qualcomm.com>
Cc: Al Viro <viro@...iv.linux.org.uk>, Sam Day <me@...cday.com>,
	Christian Brauner <brauner@...nel.org>,
	Chen Ni <nichen@...as.ac.cn>, Mateusz Guzik <mjguzik@...il.com>,
	Liang Jie <liangjie@...iang.com>,
	Ingo Rohloff <ingo.rohloff@...terbach.com>,
	Owen Gu <guhuinan@...omi.com>,
	Christophe JAILLET <christophe.jaillet@...adoo.fr>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] usb: gadget: Use sysfs_emit instead of sprintf

On Sun, Feb 01, 2026 at 04:01:46PM +0530, Krishna Kurapati wrote:
> 
> 
> On 2/1/2026 12:58 PM, Greg Kroah-Hartman wrote:
> > On Sat, Jan 31, 2026 at 09:31:09PM +0530, Krishna Kurapati wrote:
> > > Use sysfs_emit() instead of sprintf() in configfs attribute show functions.
> > > sysfs_emit() is the recommended API for sysfs output as it provides buffer
> > > overflow protection and proper formatting.
> > 
> > But this isn't sysfs, as you say, it's configfs, so why switch?  If
> > there is no need, the churn is not required.
> > 
> 
> My bad. Its for configfs. I see sysfs_emit being used in configfs show
> functions in f_ncm/u_ether_configfs.h and hence tried to move to the same in
> f_fs and source sink.

You can use it, sure, but there's no need to convert existing code
unless there is a real reason it is required.  Just use it for new code
please.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ