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]
Date:   Sun, 12 Dec 2021 21:53:36 +0000
From:   Trond Myklebust <trondmy@...merspace.com>
To:     "richard@....at" <richard@....at>
CC:     "linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "anna.schumaker@...app.com" <anna.schumaker@...app.com>,
        "david@...ma-star.at" <david@...ma-star.at>
Subject: Re: [RFC PATCH] NFS: Save 4 bytes when re-exporting

On Sun, 2021-12-12 at 22:32 +0100, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
> > Von: "Trond Myklebust" <trondmy@...merspace.com>
> > On Sun, 2021-12-12 at 22:00 +0100, Richard Weinberger wrote:
> > > When re-exporting, the whole struct nfs_fh is embedded in the new
> > > fhandle.
> > > But we need only nfs_fh->data[], nfs_fh->size is not needed.
> > > So skip fs_fh->size and save a full word (4 bytes).
> > > The downside is the extra memcpy() in nfs_fh_to_dentry().
> > > 
> > > Signed-off-by: Richard Weinberger <richard@....at>
> > > ---
> > > While investigating into improving NFS re-export I noticed that
> > > we can already save 4 bytes of overhead.
> > > I don't think we need to embedd the full struct nfs_fh and
> > > can skip ->size.
> > > 
> > 
> > NACK. This will break existing running clients. Any code to change
> > the
> > filehandle format must be accompanied with code to detect and
> > service
> > filehandles that are presented in the old format.
> 
> One possible way to distinguish between old and new formats
> is looking at the length of the data.
> 2 * XDR_UNIT = new format (without ->size).
> 3 * XDR_UNIT = old format.
> 
> What do you think?
> 

You don't a priori know the length of the underlying filehandle or its
structure. All you know is that you have n bytes of data, and it is
possible that the first 2 bytes represent the size 'n-2'. However it is
also possible that those 2 bytes are something else that just happens
to match the value 'n-2'.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@...merspace.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ