linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Teoh <htmldeveloper@gmail.com>
To: Bryan Henderson <hbryan@us.ibm.com>
Cc: Peter Teoh <htmldeveloper@gmail.com>,
	linux-fsdevel@vger.kernel.org,
	linux-fsdevel-owner@vger.kernel.org
Subject: Re: "Write once only but read many" filesystem
Date: Tue, 25 Mar 2008 08:47:16 +0800	[thread overview]
Message-ID: <47E84B94.7090508@gmail.com> (raw)
In-Reply-To: <OFC9AA28E1.B71282CD-ON88257416.005C143C-88257416.005D1BB3@us.ibm.com>

Bryan Henderson wrote:
> You're still being really vague on your requirements.  Sometimes you talk 
> about a filesystem that can't be modified after it has been written, and 
>   
Sorry for the confusion.   The requirement from upfront is that it is 
ALWAYS WRITE-ONCE only.   But many of you will say that it is 
impossible, as it can be written over again via other means.   Yes, the 
other means is via "dd", but that will require that you unmount the 
filesystem first, then using dd and hexeditor to modify the 
filesystem.   Not sure if I had made myself clear?

> other times you talk about a filesystem that can be updated, but only to 
>   

NO updating is possible.   Write once, and the file attributes defined 
from the first time it is written, and not modifiable after that - 
access control is from the kernel, and therefore userspace cannot do 
anything, once mounted of course.
> add information.  Sometimes you talk about a read-only restriction that is 
> effective against the superuser (not possible) and other times say that 
> it's OK if the superuser can modify the filesystem without a trace.
> In addition to new ext3 features, using isofs, and chattr, mounting 
> read-only and using file permissions also effect read-only status, and 
> you'd have to explain how any of these don't meet your requirements.  But 
>   
May be I will describe an auditing scenario to make myself clear - why 
the above does not meet the requirement.   First, an arbitrary 
application does something, then the auditing daemon will record it 
down, into a file.   Once the file is open for write, it is possible to 
continuosly write to it.   But once close, it automatically becomes 
read-only.   But permanently no userspace tool can reverse the read-only 
attribute - controlled from the kernel.   But while being opened and 
written, it is not possible to move back the file pointer as well - ie, 
once written, is written, not possible to overwrite.   Concurrently, 
other files can be opened on the same directory for writing.   Can any 
of the abovementioned userspace tool, or existing ext2/3/4 configuration 
can satisfy the above requirement?

> rest assured that none of them is effective against the superuser.
>
>   
Agreed - once the filesystem is unmounted, u can do anything to the 
filesystem.   But modifying any bytes of it will be difficult, the 
control mechanism as laid out in my earlier email.

>> Upon changes to its content (via dd) it will invalidate the immediate 
>> future incremental checksum.
>>     
>
> I couldn't tell what "it" is in this sentence, or what checksums you're 
> thinking of.
>
>   
Erh......Not sure what u mean?   What I mean is that if u unmount the 
filesystem, and attempt to modify any bytes of the write-once 
filesystem, it will most likely invalidate the integrity of subsequent 
data, illustrated by following diagram:

hash_functionA(checksumA, dataA) ==> checksumB.

hash_functionA(checksumB, dataB) ==> checksumC.

hash_functionA(checksumC, dataC) ==> checksumD.

Eg, if u attempt to modify the checksumB, 2 ways of detection is possible:

1.   next:   u can be detected by a mismatch of checksumC stored on the 
disk.  
2.   previous:   u can be detected by a mismatch of checksumB stored on 
disk (based on previous checksumA and dataA).

Or if u attempt to modify the dataB, similarly the two ways of detection 
applies as well.

So if u really want to modify a single bytes of data, u have to start 
from the very first item in the chain.   And with an added "salt" to the 
hash_functionA (random number), it is possible to branch off the 
hash_functionA(checksumB, dataB) into many different branches, thus 
implementing the concurrent open files concept.   And the algorithm of 
calculation as described easily facilitate a forward looking concept - 
no previous data have to be modified - so whatever written on disk, will 
be written, not modifiable anymore.

Is the concept clearer now?

> --
> Bryan Henderson                     IBM Almaden Research Center
> San Jose CA                         Filesystems
>
>
>
>   


  reply	other threads:[~2008-03-25  0:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-24  6:45 "Write once only but read many" filesystem Peter Teoh
2008-03-24 16:56 ` Bryan Henderson
2008-03-25  0:47   ` Peter Teoh [this message]
2008-03-25 15:22     ` Matthew Wilcox
2008-03-25 18:42       ` Bryan Henderson
2008-03-25 18:32     ` Bryan Henderson
2008-03-26  2:27       ` Peter Teoh
2008-03-26 16:49         ` Bryan Henderson
  -- strict thread matches above, loose matches on Subject: below --
2008-03-14 16:17 filesystem differentiation Peter Teoh
2008-03-14 23:24 ` Andreas Dilger
2008-03-22  4:39   ` "Write once only but read many" filesystem Peter Teoh
     [not found]     ` <20080322102331.GA19347@logfs.org>
     [not found]       ` <804dabb00803220752h670757d8o9c1b7fa3696467bc@mail.gmail.com>
     [not found]         ` <20080322150626.GB19347@logfs.org>
2008-03-22 15:55           ` Peter Teoh
2008-03-22 16:59             ` Jörn Engel
2008-03-24  4:49               ` Scott Lovenberg
2008-03-24  6:35                 ` Peter Teoh

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=47E84B94.7090508@gmail.com \
    --to=htmldeveloper@gmail.com \
    --cc=hbryan@us.ibm.com \
    --cc=linux-fsdevel-owner@vger.kernel.org \
    --cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).