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: <YLm7eCBkwuU0cZws@google.com>
Date:   Thu, 3 Jun 2021 22:34:48 -0700
From:   Jaegeuk Kim <jaegeuk@...nel.org>
To:     Eric Biggers <ebiggers@...nel.org>
Cc:     linux-kernel@...r.kernel.org,
        linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH v2] f2fs: clean up /sys/fs/f2fs/<disk>/features

On 06/03, Eric Biggers wrote:
> On Thu, Jun 03, 2021 at 09:42:08PM -0700, Jaegeuk Kim wrote:
> >  enum feat_id {
> >  	FEAT_CRYPTO = 0,
> >  	FEAT_BLKZONED,
> > @@ -587,6 +601,7 @@ enum feat_id {
> >  	FEAT_RO,
> >  	FEAT_TEST_DUMMY_ENCRYPTION_V2,
> >  	FEAT_ENCRYPTED_CASEFOLD,
> > +	FEAT_PIN_FILE,
> >  };
> >  
> >  static ssize_t f2fs_feature_show(struct f2fs_attr *a,
> > @@ -610,6 +625,7 @@ static ssize_t f2fs_feature_show(struct f2fs_attr *a,
> >  	case FEAT_RO:
> >  	case FEAT_TEST_DUMMY_ENCRYPTION_V2:
> >  	case FEAT_ENCRYPTED_CASEFOLD:
> > +	case FEAT_PIN_FILE:
> >  		return sprintf(buf, "supported\n");
> >  	}
> >  	return 0;
> 
> There's no need for the feat_id enum to exist.  If f2fs_feature_show() just
> always printed "supported\n", it will do the right thing.

Done.

> 
> Also, adding pin_file probably should be a separate patch.  That seems to be a
> bug fix, as pin_file was mistakenly added to the per-sb feature list instead of
> to the kernel feature list?

Done.

> 
> > +static ssize_t f2fs_sb_feature_show(struct f2fs_attr *a,
> > +		struct f2fs_sb_info *sbi, char *buf)
> > +{
> > +	if (F2FS_MATCH_FEATURE(sbi, a->id))
> > +		return sprintf(buf, "supported\n");
> > +	return sprintf(buf, "unsupported\n");
> > +}
> 
> This can just use F2FS_HAS_FEATURE(), provided that encrypted_casefold isn't
> included here, which it shouldn't be (as discussed elsewhere).

I know, but I think it'd be good to sync with kernel feature.

> 
> - Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ