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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YLnlPxfCVJD+p6/a@kroah.com>
Date:   Fri, 4 Jun 2021 10:33:03 +0200
From:   Greg KH <greg@...ah.com>
To:     David Laight <David.Laight@...lab.com>
Cc:     'Jaegeuk Kim' <jaegeuk@...nel.org>,
        Eric Biggers <ebiggers@...nel.org>,
        Daniel Rosenberg <drosen@...gle.com>,
        Chao Yu <chao@...nel.org>,
        "linux-f2fs-devel@...ts.sourceforge.net" 
        <linux-f2fs-devel@...ts.sourceforge.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        Gabriel Krisman Bertazi <krisman@...labora.com>,
        "kernel-team@...roid.com" <kernel-team@...roid.com>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] f2fs: Advertise encrypted casefolding in sysfs

On Fri, Jun 04, 2021 at 08:27:32AM +0000, David Laight wrote:
> From: Jaegeuk Kim
> > Sent: 04 June 2021 05:45
> ...
> > > > @@ -161,6 +161,9 @@ static ssize_t features_show(struct f2fs_attr *a,
> > > >  	if (f2fs_sb_has_compression(sbi))
> > > >  		len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s",
> > > >  				len ? ", " : "", "compression");
> > > > +	if (f2fs_sb_has_casefold(sbi) && f2fs_sb_has_encrypt(sbi))
> > > > +		len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s",
> > > > +				len ? ", " : "", "encrypted_casefold");
> > > >  	len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s",
> > > >  				len ? ", " : "", "pin_file");
> > > >  	len += scnprintf(buf + len, PAGE_SIZE - len, "\n");
> 
> Looking at that pattern, why don't you just append "tag, "
> each time and then replace the final ", " with "\n" at the end.

Again PLEASE NO!

This is not how sysfs is supposed to work and do not perpetuate this
mess in any way.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ