login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
February
»
6
Re: [patch] x86-64 ext2/ext3 datestamp problem
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Markus Rechberger
Subject:
Re: [patch] x86-64 ext2/ext3 datestamp problem
Date: Tuesday, February 6, 2007 - 2:40 pm
Signed-off-by: Markus Rechberger <markus.rechberger@amd.com> Markus Rechberger wrote:
quoted text
> Hi, > > there is an issue with ext2/ext3 date stamps, if someone creates a file > with a timestamp between 1902 and 1970(epoch 0) it will overflow and > result in a higher date than 2038. > > $ touch --date "1905-01-01" test > $ ls -lah test > -rw-r--r-- 1 root root 0 Jan 1 1905 test (this is a cached value here) > (remount the partition/clear the cache) > $ ls -lah test > -rw-r--r-- 1 root root 0 Feb 6 2041 test > > 10000101101111001100011001110000 .. -2051226000 (1905) > 10000101101111001100011001110000 .. 2243741296 (2041) > > this was tested against linus git tree > > Markus > > > ------------------------------------------------------------------------ > > diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c > index dd4e14c..9fa1bd6 100644 > --- a/fs/ext2/inode.c > +++ b/fs/ext2/inode.c > @@ -1079,9 +1079,9 @@ void ext2_read_inode (struct inode * inode) > } > inode->i_nlink = le16_to_cpu(raw_inode->i_links_count); > inode->i_size = le32_to_cpu(raw_inode->i_size); > - inode->i_atime.tv_sec = le32_to_cpu(raw_inode->i_atime); > - inode->i_ctime.tv_sec = le32_to_cpu(raw_inode->i_ctime); > - inode->i_mtime.tv_sec = le32_to_cpu(raw_inode->i_mtime); > + inode->i_atime.tv_sec = (signed)le32_to_cpu(raw_inode->i_atime); > + inode->i_ctime.tv_sec = (signed)le32_to_cpu(raw_inode->i_ctime); > + inode->i_mtime.tv_sec = (signed)le32_to_cpu(raw_inode->i_mtime); > inode->i_atime.tv_nsec = inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec = 0; > ei->i_dtime = le32_to_cpu(raw_inode->i_dtime); > /* We now have enough fields to check if the inode was active or not. > diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c > index beaf25f..5d171c0 100644 > --- a/fs/ext3/inode.c > +++ b/fs/ext3/inode.c > @@ -2673,9 +2673,9 @@ void ext3_read_inode(struct inode * inode) > } > inode->i_nlink = le16_to_cpu(raw_inode->i_links_count); > inode->i_size = le32_to_cpu(raw_inode->i_size); > - inode->i_atime.tv_sec = le32_to_cpu(raw_inode->i_atime); > - inode->i_ctime.tv_sec = le32_to_cpu(raw_inode->i_ctime); > - inode->i_mtime.tv_sec = le32_to_cpu(raw_inode->i_mtime); > + inode->i_atime.tv_sec = (signed)le32_to_cpu(raw_inode->i_atime); > + inode->i_ctime.tv_sec = (signed)le32_to_cpu(raw_inode->i_ctime); > + inode->i_mtime.tv_sec = (signed)le32_to_cpu(raw_inode->i_mtime); > inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0; > > ei->i_state = 0; >
-- Markus Rechberger Operating System Research Center AMD Saxony LLC & Co. KG -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[patch] x86-64 ext2/ext3 datestamp problem
, Markus Rechberger
, (Tue Feb 6, 2:33 pm)
Re: [patch] x86-64 ext2/ext3 datestamp problem
, Markus Rechberger
, (Tue Feb 6, 2:40 pm)
Re: [patch] x86-64 ext2/ext3 datestamp problem
, H. Peter Anvin
, (Tue Feb 6, 2:49 pm)
Re: [patch] x86-64 ext2/ext3 datestamp problem
, Markus Rechberger
, (Tue Feb 6, 2:57 pm)
Re: [patch] x86-64 ext2/ext3 datestamp problem
, H. Peter Anvin
, (Tue Feb 6, 3:00 pm)
Re: [patch] x86-64 ext2/ext3 datestamp problem
, H. Peter Anvin
, (Tue Feb 6, 3:06 pm)
Re: [patch] x86-64 ext2/ext3 datestamp problem
, Markus Rechberger
, (Tue Feb 6, 3:07 pm)
Re: [patch] x86-64 ext2/ext3 datestamp problem
, Markus Rechberger
, (Tue Feb 6, 3:23 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Kay Sievers
Re: char/tpm: tpm_infineon no longer loaded for HP 2510p laptop
Eric W. Biederman
[PATCH 8/8] sysfs: user namespaces: fix bug with clone(CLONE_NEWUSER) with fairsched
S K
Re: cpufreq doesn't seem to work in Intel Q9300
Bart Van Assche
Re: Is gcc thread-unsafe?
Aaron Straus
Re: [NFS] blocks of zeros (NULLs) in NFS files in kernels >= 2.6.20
git
:
Junio C Hamano
Re: git-svnimport
Junio C Hamano
Re: [PATCH] git-mv: Keep moved index entries inact
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
Gabriel
[PATCH] When a remote is added but not fetched, tell the user.
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
sm501: add power control callback
Linux Kernel Mailing List
MIPS: Cavium: Remove unused watchdog code.
Linux Kernel Mailing List
V4L/DVB (8976): af9015: Add USB ID for AVerMedia A309
Linux Kernel Mailing List
ARM: 5670/1: bcmring: add default configuration for bcmring arch
linux-netdev
:
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Ingo Molnar
Re: [regression] nf_iterate(), BUG: unable to handle kernel NULL pointer dereference
Eric W. Biederman
[PATCH 14/20] net: Simplify pppol2tp pernet operations.
Jeff Kirsher
[net-2.6 PATCH 2/5] e1000e: increase swflag acquisition timeout for ICHx/PCH
openbsd-misc
:
daniele.pilenga
snmpd hangs on 4.1 looking up hrSWRunTable
Christophe Rioux
Implementation example of snmp
Nick Holland
Re: booting openbsd on eee without cd-rom
Bryan Irvine
Re: OpenBSD 4.7 Released, May 19 2010
Cabillot Julien
Re: OpenBSD isakmpd and pf vs Cisco PIX or ASA
Colocation donated by:
Syndicate