linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] misc: add 2038 timestamp support
Date: Thu, 18 Apr 2024 10:36:11 -0400	[thread overview]
Message-ID: <20240418143611.GA3373668@mit.edu> (raw)
In-Reply-To: <20230927054016.16645-1-adilger@dilger.ca>

On Tue, Sep 26, 2023 at 11:40:16PM -0600, Andreas Dilger wrote:
> The ext4 kernel code implemented support for s_mtime_hi,
> s_wtime_hi, and related timestamp fields to avoid timestamp
> overflow in 2038, but similar handling is not in e2fsprogs.
> ...

Hey Andreas,

I had recently taken this patch, but I've since found that it was
causing a number of problems.  These have been fixed on the next
branch, but if you have your own build of e2fsprogs, you might want to
make sure you have these two fixups.  The second is especially
important if you plan to use debugfs's set_super_value command on
customer file systems....

In the future, I strongly suggest that large patches to e2fsprogs are
run with make check run with trees built with "configure
--enable-ubsan" and "configure -enable-asan".  If you have a github
account, pushing the changes so that the github actions will do a CI
using github actions to make sure that there aren't build problems on
i386, Windows, MacOS, and Android is also a good thing to do.

Cheers,
						- Ted


commit 5b599a325c1af94111940c14d888ade937f29d19
Author: Theodore Ts'o <tytso@mit.edu>
Date:   Wed Apr 17 23:47:02 2024 -0400

    Fix 32-bit build and test failures
    
    Commit ca8bc9240a00 ("Add post-2038 timestamp support to e2fsprogs")
    was never built or tested on a 32-bit.  It introduced some build
    problems when time_t is a 32-bit integer, and it exposed some test
    bugs.  Fix them.
    
    Fixes: ca8bc9240a00 ("Add post-2038 timestamp support to e2fsprogs")
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>

commit 9103e1e792170a836884db4ee9f2762bf1684f09
Author: Theodore Ts'o <tytso@mit.edu>
Date:   Thu Apr 18 10:04:27 2024 -0400

    debugfs: fix set_field's handling of timestamps
    
    How timestamps are encoded in inodes and superblocks are different.
    Unfortunately, commit ca8bc9240a00 which added post-2038 timestamps
    was (a) overwriting adjacent superblock fields and/or attempting
    unaligned writes to a 8-bit field from a 32-bit pointer, and (b) using
    the incorrect encoding for timestamps stored in inodes.  Fix both of
    these issues, which were found thanks to UBSAN.
    
    Fixes: ca8bc9240a00 ("Add post-2038 timestamp support to e2fsprogs")
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>

  parent reply	other threads:[~2024-04-18 14:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27  5:40 [PATCH] misc: add 2038 timestamp support Andreas Dilger
2024-04-01 21:29 ` Andreas Dilger
2024-04-17  2:03 ` Theodore Ts'o
2024-04-18 14:36 ` Theodore Ts'o [this message]
2024-04-18 18:32   ` Theodore Ts'o
2024-04-18 22:04   ` Andreas Dilger
2024-04-19  3:46     ` Theodore Ts'o

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=20240418143611.GA3373668@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    /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).