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: <5089790C.8080606@msgid.tls.msk.ru>
Date:	Thu, 25 Oct 2012 21:38:20 +0400
From:	Michael Tokarev <mjt@....msk.ru>
To:	Lukáš Czerner <lczerner@...hat.com>
CC:	linux-ext4@...r.kernel.org, sandeen@...hat.com
Subject: Re: [PATCH] ext4: do not try to write superblock on journal-less
 readonly remount

On 25.10.2012 16:43, Lukáš Czerner wrote:
> On Thu, 25 Oct 2012, Michael Tokarev wrote:
> 
>> Date: Thu, 25 Oct 2012 12:39:57 +0400
>> From: Michael Tokarev <mjt@....msk.ru>
>> To: linux-ext4@...r.kernel.org
>> Cc: sandeen@...hat.com, Michael Tokarev <mjt@....msk.ru>
>> Subject: [PATCH] ext4: do not try to write superblock on journal-less readonly
>>      remount
>>
>> When a journal-less ext4 filesystem is mounted on a read-only block
>> device (blockdev --setro will do), each remount (for other, unrelated,
>> flags, like suid=>nosuid etc) results in a series of scary messages
>> from kernel telling about I/O errors on the device.
> 
> Hi Michael,
> 
> I am not able to reproduce the problem you're seeing:
> 
> mkfs.ext4 /dev/sdd1
> tune2fs -O ^has_journal /dev/sdd1
> blockdev --setro /dev/sdd1
> mount /dev/sdd1 /mnt/test
> 
> and then
> 
> mount -o remount,suid /dev/sdd1
> mount -o remount,nosuid /dev/sdd1
> mount -o remount,noatime /dev/sdd1
> mount -o remount,relatime /dev/sdd1
> mount -o remount,relatime,commit=20 /dev/sdd1
> 
> just does not produce any errors. Both /var/log/messages and dmesg
> are clear.

Interesting.

Actual situation where I observed this issue was when the device
really was read-only.  In my case it was a virtual machine (kvm)
with a read-only virtio drive (-drive file=foo,if=virtio,readonly=on).
I played with a "live CD"-type system.

Now when I look at it, I'm not sure if I were really able to
reproduce it with regular /dev/sdNN and blockdev --setro.  I
*think* it was reproducible, but actually I can't.  So it looks
like blockdev --setro does not do what it claims to do -- the
actual device isn't really set read-only.

The errors produced at remount are real, when the device in question
really dislikes (reject) writes.  Apparently --setro isn't enough --
somewhere at kernel level write for such device are actually succeeded
instead of being errored out, when the device itself does not reject
writes.  So the impact is even less severe when I initially thought.

Thanks,

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