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: <20210430121757.GA1936051@redhat.com>
Date:   Fri, 30 Apr 2021 08:17:57 -0400
From:   Vivek Goyal <vgoyal@...hat.com>
To:     Greg Kurz <groug@...d.org>
Cc:     Miklos Szeredi <miklos@...redi.hu>,
        virtualization@...ts.linux-foundation.org,
        Stefan Hajnoczi <stefanha@...hat.com>,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        virtio-fs@...hat.com, Robert Krawitz <rlk@...hat.com>
Subject: Re: [PATCH v2] virtiofs: propagate sync() to file server

On Tue, Apr 27, 2021 at 09:09:21PM +0200, Greg Kurz wrote:
[..]
> > > diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
> > > index 54442612c48b..1265ca17620c 100644
> > > --- a/include/uapi/linux/fuse.h
> > > +++ b/include/uapi/linux/fuse.h
> > > @@ -179,6 +179,9 @@
> > >   *  7.33
> > >   *  - add FUSE_HANDLE_KILLPRIV_V2, FUSE_WRITE_KILL_SUIDGID, FATTR_KILL_SUIDGID
> > >   *  - add FUSE_OPEN_KILL_SUIDGID
> > > + *
> > > + *  7.34
> > > + *  - add FUSE_SYNCFS
> > >   */
> > >  
> > >  #ifndef _LINUX_FUSE_H
> > > @@ -214,7 +217,7 @@
> > >  #define FUSE_KERNEL_VERSION 7
> > >  
> > >  /** Minor version number of this interface */
> > > -#define FUSE_KERNEL_MINOR_VERSION 33
> > > +#define FUSE_KERNEL_MINOR_VERSION 34
> > >  
> > >  /** The node ID of the root inode */
> > >  #define FUSE_ROOT_ID 1
> > > @@ -499,6 +502,7 @@ enum fuse_opcode {
> > >  	FUSE_COPY_FILE_RANGE	= 47,
> > >  	FUSE_SETUPMAPPING	= 48,
> > >  	FUSE_REMOVEMAPPING	= 49,
> > > +	FUSE_SYNCFS		= 50,
> > >  
> > >  	/* CUSE specific operations */
> > >  	CUSE_INIT		= 4096,
> > > @@ -957,4 +961,8 @@ struct fuse_removemapping_one {
> > >  #define FUSE_REMOVEMAPPING_MAX_ENTRY   \
> > >  		(PAGE_SIZE / sizeof(struct fuse_removemapping_one))
> > >  
> > > +struct fuse_syncfs_in {
> > > +	uint64_t flags;
> > > +};
> > > +
> > 
> > Hi Greg,
> > 
> > Will it be better if 32bits are for flags and reset 32 are
> > padding and can be used in whatever manner.
> > 
> > struct fuse_syncfs_in {
> > 	uint32_t flags;
> > 	uint32_t padding;
> > };
> > 
> > This will increase the flexibility if we were to send more information
> > in future.
> > 
> > I already see bunch of structures where flags are 32 bit and reset
> > are padding bits. fuse_read_in, fuse_write_in, fuse_rename2_in etc.
> > 
> > Thanks
> > Vivek
> > 
> 
> Yes, it makes sense. I'll wait a few more days and roll out a v3.

Thinking more about it. We are not using any of the fields of this
structure right now. So may be all of it can be padding and no need
to add "flags".

struct fuse_syncfs_in {
	uint64_t padding;
};

Essentially what you have already done  :-). Just rename flags to
padding/unused to make it clear its unused for now.

Vivek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ