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: <25517.1479459564@warthog.procyon.org.uk>
Date:   Fri, 18 Nov 2016 08:59:24 +0000
From:   David Howells <dhowells@...hat.com>
To:     Andreas Dilger <adilger@...ger.ca>
Cc:     dhowells@...hat.com, Jeff Layton <jlayton@...hat.com>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        drepper@...il.com, linux-api@...r.kernel.org
Subject: Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available

Andreas Dilger <adilger@...ger.ca> wrote:

> >> If neither AT_STATX_*_SYNC flag is set, the behaviour is the default for
> >> stat() on that filesystem.
> > 
> > We also need to specify here what happens if both bits are set. Should
> > that be -EINVAL?
> 
> If that is the case, then it doesn't make sense to have two contradictory
> flags.

Yes it does.  There are actually *three* cases, not two.  Maybe, rather than a
pair of flags, I should stake out a 2-bit field with three possible values.

> Pick a default behaviour (i.e. return what is known on the client),

The default behaviour has to be what stat() does now for any particular
filesystem.  statx() is likely to get used to emulate stat() so that stat()
can be made to return safe timestamps.  If we make it so that statx() cannot
do this, it's very likely that we'll see yet another stat() variant syscall
being added.

> and if this is 100% accurate (e.g. local filesystem or filesystem with
> strong coherency)

In a netfs, it was 100% accurate at the point the server started transmitting
its reply.  This may no longer be true - even with something like AFS that has
change notifications.

> then it can optionally set the SYNC flag in the returned
> flags.

So you suggest putting the SYNC flag(s) in the request mask rather than
sharing the AT_* flag space?

> If the application needs 100% accurate size info, then it can set the SYNC
> flag in the request and the filesystem may need to do extra work to fetch
> accurate data from the server.

Note that one of the things that people asked for was a
DONT_GO_TO_THE_SERVER_AT_ALL flag.  I take it this is your suggested default?

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ