From: "Adam J. Richter" <adam@yggdrasil.com>
To: hch@infradead.org
Cc: aia21@cantab.net, kernel@bonin.ca, linux-kernel@vger.kernel.org
Subject: Re: Loop devices under NTFS
Date: Tue, 27 Aug 2002 06:53:19 -0700 [thread overview]
Message-ID: <200208271353.GAA04875@adam.yggdrasil.com> (raw)
On Tue, 27 Aug 2002, Christoph Hellwig:
>Yes. Anything but the filesystem itself and the generic read/write path
>is not supposed to use address space operations directly.
Why?
According to linux-2.5.31/Documentation/Locking,
"->prepare_write(), ->commit_write(), ->sync_page() and ->readpage()
may be called from the request handler (/dev/loop)."
Using the page cache in loop.c saves a copy when there is a
data transformation (such as encryption) involved, and that can be
important for reducing the cost of privacy.
>> >Note that there is a more severe bug in loop.c: it's abuse of
>> >do_generic_file_read.
>>
>> Could you please elaborate on this and give an example where
>> it return incorrect data, deadlock, generate a kernel oops, etc.?
>Depending on the filesystem implementation _anything_ may happen.
>With current intree filesystems the only real life problem is that
>it doesn't work on certain filesystems.
Sorry for repeating myself here: If you're referring to the
stock loop.c not working with tmpfs because tmpfs lacks
{prepare,commit}_write which my patch works around (based on Jari's
patch before mine, and a patch by Andrew Morton as well). I have yet
to hear a clear reason why any writable plain file on any given file
system could not have {prepare,commit}_write operations available.
>I think at least the network
>filesystems might be oopsable with some preparation.
Please come up with a clear example. I'm not asking you for a
test case that can produce it, just some narrative of the problem
occurring.
I am aware that you can get races if someone mounts a loop
device while accessing the underlying file by some other mechanism,
but I believe that the only case where that would be done in practice
is to change the encryption of a device, and, because of the read and
write patterns involved in that, it should not be a problem.
Adam J. Richter __ ______________ 575 Oroville Road
adam@yggdrasil.com \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."
next reply other threads:[~2002-08-27 13:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-27 13:53 Adam J. Richter [this message]
2002-08-27 17:04 ` Christoph Hellwig
2002-08-27 17:26 ` Jan Harkes
-- strict thread matches above, loose matches on Subject: below --
2002-08-29 11:00 Adam J. Richter
2002-08-29 11:27 ` Anton Altaparmakov
2002-08-29 15:16 ` Jari Ruusu
2002-08-28 9:17 Adam J. Richter
2002-08-28 1:49 Adam J. Richter
2002-08-28 8:36 ` Urban Widmark
2002-08-28 1:06 Adam J. Richter
2002-08-28 15:50 ` Andre Bonin
2002-08-28 16:41 ` Christoph Hellwig
2002-08-27 23:42 Adam J. Richter
2002-08-27 23:59 ` Christoph Hellwig
2002-08-27 13:23 Adam J. Richter
2002-08-27 13:27 ` Christoph Hellwig
2002-08-27 12:40 Adam J. Richter
2002-08-27 12:46 ` Anton Altaparmakov
2002-08-27 13:15 ` Christoph Hellwig
2002-08-27 4:48 Andre Bonin
2002-08-27 9:17 ` Anton Altaparmakov
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=200208271353.GAA04875@adam.yggdrasil.com \
--to=adam@yggdrasil.com \
--cc=aia21@cantab.net \
--cc=hch@infradead.org \
--cc=kernel@bonin.ca \
--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
all inboxes | Powered by JetHome®