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: <20071105185241.7ff1d8f3.akpm@linux-foundation.org>
Date:	Mon, 5 Nov 2007 18:52:41 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Matt Mackall <mpm@...enic.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Loopback mounts should update the mtime of the
 underlying file on writes

On Mon, 5 Nov 2007 19:09:24 -0600 Matt Mackall <mpm@...enic.com> wrote:

> Noticed by a Mercurial user. I think this should fix it.
> 

"should".  That pitter patter sound your hear is little akpm feet running
away.

> 
> Index: l/drivers/block/loop.c
> ===================================================================
> --- l.orig/drivers/block/loop.c	2007-11-05 17:50:07.000000000 -0600
> +++ l/drivers/block/loop.c	2007-11-05 19:03:51.000000000 -0600
> @@ -221,6 +221,7 @@ static int do_lo_send_aops(struct loop_d
>  	offset = pos & ((pgoff_t)PAGE_CACHE_SIZE - 1);
>  	bv_offs = bvec->bv_offset;
>  	len = bvec->bv_len;
> +	file_update_time(file);
>  	while (len > 0) {
>  		sector_t IV;
>  		unsigned size;
> @@ -299,6 +300,7 @@ static int __do_lo_send_write(struct fil
>  
>  	set_fs(get_ds());
>  	bw = file->f_op->write(file, buf, len, &pos);
> +	file_update_time(file);
>  	set_fs(old_fs);
>  	if (likely(bw == len))
>  		return 0;

Probably makes sense, but bear in mind that we can be fairly deep in
filesystem A functions here, and file_update_time() can do stuff like
starting journal transactions on filesystem B.

I expect the worst we'll see is not-yet-suppressed lockdep warnings and
possibly extra stack windup, but this patch may end up being more complex
than one expects..

-
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