The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: csg <chr@abelard.de>
To: linux-kernel@vger.kernel.org
Subject: Readonly mounted ext2 filesystem partition changeable: Bug or Feature?
Date: Sat, 09 Aug 2003 12:12:48 +0200	[thread overview]
Message-ID: <oprtmunmkc06yy9w@smtp.1und1.com> (raw)

[PLEASE copy any answer to this posting to
    chr@abelard.de
Thanks.]

Hello,

Short: I have seen changes made to a readonly mounted ext2 filesystem by
communicating with /sbin/init via /dev/initctl. This strange behaviour
goes away while moving /dev into RAM by using DEVFS.

In my opinion this is a bug. Or is it a feature?

**********************

Szenario:

System: Linux debian30 2.4.18-1-k6 #1 Fri Jun 6 23:55:12 EST 2003 i586 unknown
        IDE disk

I have made 1 readonly ROOT-partition including /dev (and some symbolic links)
and 1 read-write VAR-partition (without exec permission).

Then I created MD5SUM over the entire readonly partition, put the checksum
along with a check-script on a (later) write-protected floppy. Now on every reboot the floppy will be mounted and the check-script compares the saved checksum with the one created on the fly over the current partition.

After rebooting or calling something like "init <new runlevel>" the partition
was found altered. "cmp" / "diff" in front to a reference pointed out the
change was made in mid of data region of the ext2-filesystem.
(Not in metedata, therefore no "mount-count"-problem; of course: no journal.)

The problem goes ahead if

 - I do remove /dev/initctl
   (Of course, the system is now no longer able to shutdown correctly
   or to change the runlevel)
   or
   - I do switch to DEVFS which moves /dev and /dev/initctl to RAM.

I find this strange.
The expected behaviour would be to output an error message like
"Permission denied: Can not write to read-only filesystem".

So I think, it is a bug. But I'm not sure: May be it is a feature?

Thanks for your answer.

Christian Schmidt-Guetter



-- 
Christian Schmidt-Guetter
Email:   chr@abelard.de



             reply	other threads:[~2003-08-08 10:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-09 10:12 csg [this message]
2003-08-08 10:23 ` Readonly mounted ext2 filesystem partition changeable: Bug or Feature? P

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=oprtmunmkc06yy9w@smtp.1und1.com \
    --to=chr@abelard.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox