Re: [PATCH] misc: add 2038 timestamp support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
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@xxxxxxx>

commit 9103e1e792170a836884db4ee9f2762bf1684f09
Author: Theodore Ts'o <tytso@xxxxxxx>
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@xxxxxxx>




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux