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: <200702130952.26048.andi@firstfloor.org>
Date:	Tue, 13 Feb 2007 09:52:25 +0100
From:	Andi Kleen <andi@...stfloor.org>
To:	Jeff Chua <jeff.chua.linux@...il.com>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Arjan van de Ven <arjan@...radead.org>,
	Miquel van Smoorenburg <miquels@...tron.nl>,
	Linus Torvalds <torvalds@...l.org>
Subject: Re: [PATCH] nanosecond filesystem support???


> It seems that the part that's not returning nanosecond is in the code 
> below. I've modified it, and now stat() is returning st_mtim.tv_nsec 
> correctly.
> 
> I've tested it on ext2 and reiserfs, and both seems to be working.
> 
> 
> I don't know why "t.tv_nsec = 0;" was set in the code. Any idea?

The first hunk doesn't make any sense. stime() will never know anything about
nanoseconds. You're just putting uninitialized memory in there.

The truncation you removed in the second was deliberately added for the old file
systems that don't support higher granuality *times. Otherwise
the time can jump backwards between a inode that is still cached
in memory and one that is saved/restored from disk. Several programs
(including make) assume this cannot happen, so the kernel prevents it
by always rounding.

If you want ns resolution you need a file system that supports it:
that's currently XFS, JFS, NTFS/CIFS (resolution is lower, but < 1s), NFSv[34], UDF, 
with suitable servers,  tmpfs/ramfs/hugetlbfs. ext4 ns support is being worked on,

BTW the real max resolution supported in the kernel right now is jiffies.

-Andi


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ