On Tue, 9 May 2000, Benhanokh Gabriel wrote:
> > Ah. How do you make sure the newly allocated blocks cannot ever
> > be read by an application until after they have been written to, then?
> no application but mine should ever be aware to the allocated blocks.
> reads from a file are checked with the file size not in the blocks numbers,
> so if i update file size only after writes this should be ok.
That sounds dangerously like "security through obscurity", IMO...
You must not expose the ability to read blocks from disk which have not
been either initialised to zero, or previously written. In effect, the
file must be a copy-on-write area of zeros. Anything else is a security
hole - you can read the contents of deleted files.
> > What do you need this facility for - some sort of kernel-level facility,
> > or an application?
In which case, the security issue is important - you can't just restrict
this to kernel access only, for example.
> > Does it have to be ext2fs only, though?
> not realy, actually i don't even think the ext2fs is suitable for us as we
> are aiming at the highend storage market, and ext2fs is too limited( file
> sizes can't excced 2GB, no jornaling...). but from what i read ext3fs should
> be good for us, and it suppose to have very similier design so i guess
> working with ext2fs would prove usefull.
Perhaps - why tie it to any specific filing system, though?
More to the point: why do you want to bypass the security system?
> > Personally, I'd add the raw functions necessary to ext2fs, then export it
> > via VFS, rather than hitting ext2fs directly. There are already several
> > replacements for ext2fs approaching inclusion in the kernel; if your
> > code is hardwired into the ext2fs code, you will have a lot of problems
> > later on, when you try to move to XFS, ReiserFS, ext3fs or whatever.
> i don't know if ext3fs is ready now, i saw that it is version 0.03, so i
> prefer to play with a stable version first.
> XFS looks very nice, but again i don't know when it will be release.
XFS has been released. It's not in the mainstream kernels yet, but it's
out there. Really, you should try to make this functionality available on
every filing system, rather than special-casing one or two. That's
assuming it is necessary in the first place: if your first transaction on
the file is to write to it, you'll need that buffer anyway...
> at the moment i'm using only one call from ex2fs (ext2_getblk) and all the
> rest is done with cheating the buffer cache, i might try to get a more
> general soloution .bmap seems to be another place to hook in and it is a VFS
The less FS-specific you can make it, the better...
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:12 EST