All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: virtio-fs@redhat.com
Subject: Re: [Virtio-fs] [PATCH 1/4] virtiofsd: Fix number of padding bits in fuse_file_info
Date: Wed, 21 Aug 2019 12:25:07 +0100	[thread overview]
Message-ID: <20190821112507.GB3351@work-vm> (raw)
In-Reply-To: <20190814085452.GA2920@work-vm>

* Dr. David Alan Gilbert (dgilbert@redhat.com) wrote:
> * Vivek Goyal (vgoyal@redhat.com) wrote:
> > Currently we have 27 padding bits while there are 6 bit fields. I suspect
> > this is wrong. We probably are trying to aling to 32 bits and hence padding
> > bits should be 26 instead.
> > 
> > Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
> 
> Yeh, I reckon this was broken upstream by 19accdf ~6 years ago; whether
> it's fixable upstream I don't know because they have API requierments
> since it's a library.
> 
> Still, it's definitely wrong so:
> 
> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

Actually I found this upstream bug:
https://github.com/libfuse/libfuse/issues/396

which is a 'wontfix'; I think the padding only really exists because
of the ABI requirements; so there's not much point in us changing it.
We could just drop padding.

Dave

> > ---
> >  contrib/virtiofsd/fuse_common.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/contrib/virtiofsd/fuse_common.h b/contrib/virtiofsd/fuse_common.h
> > index 6419f66470..4d95f6f28b 100644
> > --- a/contrib/virtiofsd/fuse_common.h
> > +++ b/contrib/virtiofsd/fuse_common.h
> > @@ -65,7 +65,7 @@ struct fuse_file_info {
> >  	unsigned int flock_release : 1;
> >  
> >  	/** Padding.  Do not use*/
> > -	unsigned int padding : 27;
> > +	unsigned int padding : 26;
> >  
> >  	/** File handle.  May be filled in by filesystem in open().
> >  	    Available in all other file operations */
> > -- 
> > 2.17.2
> > 
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


  reply	other threads:[~2019-08-21 11:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13 19:29 [Virtio-fs] [PATCH 0/4] Drop CAP_FSETID if client needs to kill setuid/setgid bits Vivek Goyal
2019-08-13 19:29 ` [Virtio-fs] [PATCH 1/4] virtiofsd: Fix number of padding bits in fuse_file_info Vivek Goyal
2019-08-14  8:54   ` Dr. David Alan Gilbert
2019-08-21 11:25     ` Dr. David Alan Gilbert [this message]
2019-08-13 19:29 ` [Virtio-fs] [PATCH 2/4] virtiofsd: Use macros for write_flag parsing Vivek Goyal
2019-08-14  9:13   ` Dr. David Alan Gilbert
2019-08-13 19:29 ` [Virtio-fs] [PATCH 3/4] virtiofsd: Parse flag FUSE_WRITE_KILL_PRIV Vivek Goyal
2019-08-14  9:28   ` Dr. David Alan Gilbert
2019-08-13 19:29 ` [Virtio-fs] [PATCH 4/4] virtiofsd: Drop CAP_FSETID if client asked for it Vivek Goyal
2019-08-14  9:52   ` Dr. David Alan Gilbert
2019-08-14 12:43     ` Vivek Goyal
2019-08-14 13:17       ` Dr. David Alan Gilbert
2019-08-14  9:55 ` [Virtio-fs] [PATCH 0/4] Drop CAP_FSETID if client needs to kill setuid/setgid bits Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190821112507.GB3351@work-vm \
    --to=dgilbert@redhat.com \
    --cc=vgoyal@redhat.com \
    --cc=virtio-fs@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.