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: <20231026203733.fx65mjyic4pka3e5@moria.home.lan>
Date:   Thu, 26 Oct 2023 16:37:33 -0400
From:   Kent Overstreet <kent.overstreet@...ux.dev>
To:     Amir Goldstein <amir73il@...il.com>
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Christian Brauner <brauner@...nel.org>,
        Kent Overstreet <kent.overstreet@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Jeff Layton <jlayton@...nel.org>,
        Chuck Lever <chuck.lever@...cle.com>
Subject: Re: linux-next: manual merge of the vfs-brauner tree with the
 bcachefs tree

On Thu, Oct 26, 2023 at 10:34:18PM +0300, Amir Goldstein wrote:
> On Thu, Oct 26, 2023 at 9:35 PM Kent Overstreet
> > > This is wrong.
> > > Those are filesystem defined constants.
> > > Please don't change them.
> > >
> > > 0x81/0x82 have been used by xfs and fuse for years,
> > > even though neither defined a constant in this enum so far.
> >
> > Perhaps we could get that fixed...?
> 
> commit 2560fa66d2ac ("exportfs: define FILEID_INO64_GEN*
> file handle types") fixes that for fuse.
> I may fix up xfs to use these constants later.

Wonderful

> > > Conflicting with FILEID_BCACHEFS_WITH_PARENT is not
> > > a serious issue, but I encourage Kent to pick different constants
> > > for bcachefs or keep the bcachefs constants out of this enum.
> >
> > Happy to do so. Since it seems this enum doesn't have all the constants
> > I'd need to avoid conflicting with, I might need some help here :)
> >
> 
> Technically, you don't *need* to avoid conflicting with fileid types
> of other filesystems and you do not *need* to define your constant
> in this enum. It serves no real purpose unless your constant
> declares a fileid format that other filesystems also use.
> 
> See the comment at the top of the enum.
> 
> > > It is a slight inconvenience for users that have bcachefs exported
> > > to NFS clients and upgrade their server, but maybe that is acceptable.
> > > In overlayfs, we encoded type OVL_FILEID_V0 and switched to encoding
> > > type OVL_FILEID_V1, but we still accept decoding of both types, neither
> > > of which are listed in this enum BTW.
> > >
> > > Adding fid types to this enum is not required.
> > > This enum is a place to standardize and for different fs to share the same
> > > fid type/encoding as is the case with  FILEID_INO{32,64}_GEN*.
> > > IMO, the bcachefs constant do not follow the convention in this
> > > enum and their format is unlikely to be used by other fs, so
> > > they should not be added to this enum at all.
> >
> > Eh?
> >
> > Most of the constants here appear to be completely filesystem specific -
> > I see UDF, nilfs, btrfs, fat...
> >
> 
> There is no good reason for those to be in the enum either
> other than documentation.

Well, clearly not: since the cause of this whole thread was conflicts
with constants that were /not/ previously in this enum.

> 
> > And since you also don't want conflicts with fid_types that aren't
> > defined here, it seems like they really should all be here.
> 
> If you define your constants internally in bcachefs, I don't care
> about conflicts, but if I were you, I would avoid conflicts with
> the known types.
> 
> If you want to define your constants in this enum please choose
> any vacant 0x?{1,2} values. 0xb{1,2}?

That'll do, I'll patch accordingly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ