linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Jeff Layton <jlayton@kernel.org>
Cc: "Latchesar Ionkov" <lucho@ionkov.net>,
	"Konstantin Komarov" <almaz.alexandrovich@paragon-software.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	"Darrick J. Wong" <djwong@kernel.org>,
	"Anders Larsen" <al@alarsen.net>,
	"Carlos Llamas" <cmllamas@google.com>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"Mattia Dongili" <malattia@linux.it>,
	"Hugh Dickins" <hughd@google.com>,
	"Yonghong Song" <yonghong.song@linux.dev>,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	"Christoph Hellwig" <hch@lst.de>,
	"Mike Marshall" <hubcap@omnibond.com>,
	"Paulo Alcantara" <pc@manguebit.com>,
	linux-xfs@vger.kernel.org, "James Morris" <jmorris@namei.org>,
	"Christoph Hellwig" <hch@infradead.org>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	devel@lists.orangefs.org,
	"Shyam Prasad N" <sprasad@microsoft.com>,
	linux-um@lists.infradead.org,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Eric Van Hensbergen" <ericvh@kernel.org>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Trond Myklebust" <trond.myklebust@hammersp>
Subject: Re: [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers
Date: Thu, 28 Sep 2023 17:26:56 -0400	[thread overview]
Message-ID: <20230928212656.GC189345@mit.edu> (raw)
In-Reply-To: <6a6f37d16b55a3003af3f3dbb7778a367f68cd8d.camel@kernel.org>

On Thu, Sep 28, 2023 at 01:40:55PM -0400, Jeff Layton wrote:
> 
> Correct. We'd lose some fidelity in currently stored timestamps, but as
> Linus and Ted pointed out, anything below ~100ns granularity is
> effectively just noise, as that's the floor overhead for calling into
> the kernel. It's hard to argue that any application needs that sort of
> timestamp resolution, at least with contemporary hardware. 
> 
> Doing that would mean that tests that store specific values in the
> atime/mtime and expect to be able to fetch exactly that value back would
> break though, so we'd have to be OK with that if we want to try it. The
> good news is that it's relatively easy to experiment with new ways to
> store timestamps with these wrappers in place.

The reason why we store 1ns granularity in ext4's on-disk format (and
accept that we only support times only a couple of centuries into the
future, as opposed shooting for an on-disk format good for several
millennia :-), was in case there was userspace that might try to store
a very fine-grained timestamp and want to be able to get it back
bit-for-bit identical.

For example, what if someone was trying to implement some kind of
steganographic scheme where they going store a secret message (or more
likely, a 256-bit AES key) in the nanosecond fields of the file's
{c,m,a,cr}time timestamps, "hiding in plain sight".  Not that I think
that we have to support something like that, since the field is for
*timestamps* not cryptographic bits, so if we break someone who is
doing that, do we care?

I don't think anyone will complain about breaking the userspace API
--- especially since if, say, the CIA was using this for their spies'
drop boxes, they probably wouldn't want to admit it.  :-)

       	    	     	      	      	    - Ted

  parent reply	other threads:[~2023-09-29  0:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-28 11:05 [PATCH 85/87] fs: rename i_atime and i_mtime fields to __i_atime and __i_mtime Jeff Layton
2023-09-28 11:05 ` [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers Jeff Layton
2023-09-28 15:48   ` Arnd Bergmann
2023-09-28 17:06     ` Jeff Layton
2023-09-28 17:19       ` Darrick J. Wong
2023-09-28 17:40         ` Jeff Layton
2023-09-28 20:21           ` Arnd Bergmann
2023-09-28 21:26           ` Theodore Ts'o [this message]
2023-09-29  0:18             ` Linus Torvalds
2023-09-29  3:50               ` Amir Goldstein
2023-09-29 16:22                 ` Linus Torvalds
2023-09-29  3:27         ` Amir Goldstein
2023-09-29  6:32         ` David Howells
2023-09-30 14:50           ` Steve French
2023-10-01  5:01             ` [OT] " Gabriel Paubert
2023-09-29  9:44       ` Christian Brauner
2023-09-29 10:16         ` Jeff Layton
2023-09-28 17:09   ` Jeff Layton
2023-09-28 11:05 ` [PATCH 87/87] fs: move i_blocks up a few places in struct inode Jeff Layton
2023-09-28 11:35   ` Amir Goldstein
2023-09-28 12:01     ` Jeff Layton
2023-09-28 17:41   ` Linus Torvalds
2023-09-28 18:01     ` Jeff Layton
2023-09-29  9:32     ` Christian Brauner

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=20230928212656.GC189345@mit.edu \
    --to=tytso@mit.edu \
    --cc=agordeev@linux.ibm.com \
    --cc=al@alarsen.net \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=andrii@kernel.org \
    --cc=borntraeger@linux.ibm.com \
    --cc=cmllamas@google.com \
    --cc=devel@lists.orangefs.org \
    --cc=djwong@kernel.org \
    --cc=ericvh@kernel.org \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=hubcap@omnibond.com \
    --cc=hughd@google.com \
    --cc=jlayton@kernel.org \
    --cc=jmorris@namei.org \
    --cc=linux-um@lists.infradead.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=lucho@ionkov.net \
    --cc=malattia@linux.it \
    --cc=npiggin@gmail.com \
    --cc=pc@manguebit.com \
    --cc=rafael@kernel.org \
    --cc=sprasad@microsoft.com \
    --cc=surenb@google.com \
    --cc=trond.myklebust@hammersp \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yonghong.song@linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).