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  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]
Date:	Fri, 15 May 2015 17:14:10 +0200
From:	Jörg-Volker Peetz <jvpeetz@....de>
To:	Theodore Ts'o <tytso@....edu>
CC:	linux-ext4@...r.kernel.org
Subject: Re: ext4 lazytime: ctime of some files changed

Theodore Ts'o wrote on 05/15/2015 00:20:
> On Wed, May 13, 2015 at 06:20:35PM +0200, Jörg-Volker Peetz wrote:
>>
>> Thereafter, the two emacs package files again had a wrong mtime (which by the
>> way shows when I start emacs).
>>
>> Could this be due to the lazytime mount option?
> 
> I think I found the problem.  My bad.  Can you verify that this solves
> the problem for you?
> 
Meanwhile I've kernel version 4.0.3 with your patch on top and

$ grep -E '(root|sda)' /proc/mounts
/dev/root / ext4 rw,lazytime,nobarrier,errors=remount-ro 0 0
/dev/sda2 /home ext4 rw,lazytime,nobarrier,errors=remount-ro 0 0

running nearly two hours without any file timestamp related anomalies while
doing some file activity and a sync from time to time :-)
Thanks for caring.

> From 8f4d855839179f410fa910a26eb81d646d628f26 Mon Sep 17 00:00:00 2001
> From: Theodore Ts'o <tytso@....edu>
> Date: Thu, 14 May 2015 18:19:01 -0400
> Subject: [PATCH] ext4: fix lazytime optimization
> 
> We had a fencepost error in the lazytime optimization which means that
> timestamp would get written to the wrong inode.
> 
> Cc: stable@...r.kernel.org
> Signed-off-by: Theodore Ts'o <tytso@....edu>
> ---
>  fs/ext4/inode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 55b187c..0554b0b 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -4345,7 +4345,7 @@ static void ext4_update_other_inodes_time(struct super_block *sb,
>  	int inode_size = EXT4_INODE_SIZE(sb);
>  
>  	oi.orig_ino = orig_ino;
> -	ino = orig_ino & ~(inodes_per_block - 1);
> +	ino = (orig_ino & ~(inodes_per_block - 1)) + 1;
>  	for (i = 0; i < inodes_per_block; i++, ino++, buf += inode_size) {
>  		if (ino == orig_ino)
>  			continue;
> 
-- 
Regards,
Jörg.

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