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-next>] [day] [month] [year] [list]
Date:	Mon, 18 May 2015 10:21:35 +0200
From:	Karel Zak <kzak@...hat.com>
To:	Holger Hoffstätte 
	<holger.hoffstaette@...glemail.com>
Cc:	linux-ext4@...r.kernel.org, "Theodore Ts'o" <tytso@....edu>
Subject: Re: Lazytime undone by/not working with remount?

On Sat, May 16, 2015 at 04:26:33PM +0200, Holger Hoffstätte wrote:
> > playing with lazytime on 4.0.4-rc1 + yesterday's fencepost patch) I noticed
> > something odd. Mounting secondary (non-root) partitions with lazytime works
> > fine, but / does not seem to retain the value from fstab - apparently because
> > it is remounted rw during boot, and lazytime gets swallowed/undone.
> > 
> > Same effect when trying to remount manually with lazytime:
> > 
> > tux>findmnt /
> > TARGET SOURCE    FSTYPE OPTIONS
> > /      /dev/sda1 ext4   rw,noatime
> > 
> > tux>mount -o lazytime,remount / 
> > 
> > tux>dmesg 
> > [ 5208.482505] EXT4-fs (sda1): re-mounted. Opts: (null)
> > 
> > tux>findmnt /                  
> > TARGET SOURCE    FSTYPE OPTIONS
> > /      /dev/sda1 ext4   rw,noatime
> > 
> > tux>mount --version
> > mount from util-linux 2.26.2 (libmount 2.26.0: assert, debug)
> > 
> > Newly mounting unmounted partitions works fine.
> > 
> > Any ideas?
> 
> This turned out to be a regression in util-linux 2.26.x. :-(

 I don't think so. Try strace, for example:

 # strace -e mount mount -o lazytime,remount /home/archive
 mount("/dev/sdb1", "/home/archive", 0xcf1210, MS_REMOUNT|0x2000000, NULL) = 0
                                                          ^^^^^^^^^
                           (1<<25) aka 0x2000000 is MS_LAZYTIME


 The util-linux since version 2.26.2 supports MS_LAZYTIME flag. 
 
 I see the problem on another place. The ext4 fs driver has unique
 feature that it's able to accept "lazytime" option as string
 (util-linux < 2.26.2) as well as MS_LAZYTIME vfs flag (>= 2.26.2).

 IMHO the function ext4_remount() does not check VFS *flags for
 MS_LAZYTIME at all. The code probably cares about sb->s_flags only
 (these flags are generated by parse_options() when parse options
 string). It seems that only MS_RDONLY is expected in *flags. 

 Ted?

    Karel


-- 
 Karel Zak  <kzak@...hat.com>
 http://karelzak.blogspot.com
--
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