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: <CABg4E-=-1Ppri=TpWuTCUDmn0ye3g4cQrxvC9m0DRUrnx0Hh4Q@mail.gmail.com>
Date:   Fri, 23 Jun 2023 18:05:50 -0400
From:   Tavian Barnes <tavianator@...ianator.com>
To:     Chuck Lever <cel@...nel.org>
Cc:     linux-nfs@...r.kernel.org, Chuck Lever <chuck.lever@...cle.com>,
        Jeff Layton <jlayton@...nel.org>,
        Ondrej Valousek <ondrej.valousek.xm@...esas.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs/nfsd: Fix creation time serialization order

On Fri, Jun 23, 2023 at 5:48 PM Chuck Lever <cel@...nel.org> wrote:
> On Fri, Jun 23, 2023 at 05:09:06PM -0400, tavianator@...ianator.com wrote:
> > From: Tavian Barnes <tavianator@...ianator.com>
> >
> > In nfsd4_encode_fattr(), TIME_CREATE was being written out after all
> > other times.  However, they should be written out in an order that
> > matches the bit flags in bmval1, which in this case are
> >
> >     #define FATTR4_WORD1_TIME_ACCESS        (1UL << 15)
> >     #define FATTR4_WORD1_TIME_CREATE        (1UL << 18)
> >     #define FATTR4_WORD1_TIME_DELTA         (1UL << 19)
> >     #define FATTR4_WORD1_TIME_METADATA      (1UL << 20)
> >     #define FATTR4_WORD1_TIME_MODIFY        (1UL << 21)
> >
> > so TIME_CREATE should come second.
> >
> > I noticed this on a FreeBSD NFSv4.2 client, which supports creation
> > times.  On this client, file times were weirdly permuted.  With this
> > patch applied on the server, times looked normal on the client.
> >
> > Fixes: e377a3e698fb ("nfsd: Add support for the birth time attribute")
> > Link: https://unix.stackexchange.com/q/749605/56202
> > Signed-off-by: Tavian Barnes <tavianator@...ianator.com>
>
> I'm not especially familiar with this area of the protocol, but this
> looks correct at first glance. I've applied this to nfsd-fixes for
> v6.5.

Great, thanks!

> Out of interest, what type of filesystem does your server export?

It's a btrfs filesystem.

-- 
Tavian Barnes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ