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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070225023651.8c89f8fc.akpm@linux-foundation.org>
Date:	Sun, 25 Feb 2007 02:36:51 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Kalpak Shah <kalpak@...sterfs.com>
Cc:	linux-ext4@...r.kernel.org, adilger@...sterfs.com, tytso@....edu,
	sct@...hat.com
Subject: Re: [RFC] [PATCH 1/1] nanosecond timestamps

> On Fri, 02 Feb 2007 20:09:40 +0530 Kalpak Shah <kalpak@...sterfs.com> wrote:
> +#define EXT3_INODE_GET_XTIME(xtime, extra_xtime, inode, raw_inode)
> \
> +do {
> \
> +	(inode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime);
> \
> +									      \
> +	if (offsetof(typeof(*raw_inode), extra_xtime) -
> \
> +	    offsetof(typeof(*raw_inode), i_extra_isize) +
> \
> +   	    sizeof((raw_inode)->extra_xtime) <=
> \
> +	    le16_to_cpu((raw_inode)->i_extra_isize)) {
> \
> +		if (sizeof((inode)->xtime.tv_sec) > 4)                        \
> +			(inode)->xtime.tv_sec |=                              \
> +			(__u64)(le32_to_cpu((raw_inode)->extra_xtime) &       \
> +				EXT3_EPOCH_MASK) << 32;                       \
> +			(inode)->xtime.tv_nsec =                              \
> +				(le32_to_cpu((raw_inode)->extra_xtime) &      \
> +				EXT3_NSEC_MASK) >> 2;                         \
> +	}
> \
> +} while (0)

ow, my eyes.  Can we find a way to do this in C rather than in cpp?

> +static inline struct timespec ext3_current_time(struct inode *inode)
> +{
> +	return (inode->i_sb->s_time_gran < 1000000000) ?

NSEC_PER_SEC

> +		current_fs_time(inode->i_sb) : CURRENT_TIME_SEC;
> +}
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ