public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* khttpd and tmpfs don't get along?
@ 2002-05-22  1:40 Dan Kegel
  2002-05-22  8:54 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Kegel @ 2002-05-22  1:40 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org

I've found that khttpd tends to oops when used with tmpfs.
The oops tracebacks are not especially informative.
So far, I've only verified this with ppc, but I should be
able to verify it with x86 soon.
- Dan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: khttpd and tmpfs don't get along?
  2002-05-22  1:40 khttpd and tmpfs don't get along? Dan Kegel
@ 2002-05-22  8:54 ` Christoph Hellwig
  2002-05-22 19:20   ` Dan Kegel
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2002-05-22  8:54 UTC (permalink / raw)
  To: Dan Kegel; +Cc: linux-kernel@vger.kernel.org

On Tue, May 21, 2002 at 06:40:02PM -0700, Dan Kegel wrote:
> I've found that khttpd tends to oops when used with tmpfs.
> The oops tracebacks are not especially informative.
> So far, I've only verified this with ppc, but I should be
> able to verify it with x86 soon.

That's because it abuses do_generic_file_read.  It' the same design mistake
that also makes loop fail on tmpfs - do_generic_file_read should never have
been exported from filemap.c..


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: khttpd and tmpfs don't get along?
  2002-05-22  8:54 ` Christoph Hellwig
@ 2002-05-22 19:20   ` Dan Kegel
  2002-05-22 19:33     ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Kegel @ 2002-05-22 19:20 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-kernel@vger.kernel.org, khttpd-users@lists.alt.org,
	linuxppc-embedded@lists.linuxppc.org

Christoph Hellwig wrote:
> 
> On Tue, May 21, 2002 at 06:40:02PM -0700, Dan Kegel wrote:
> > I've found that khttpd tends to oops when used with tmpfs.
> > The oops tracebacks are not especially informative.
> > So far, I've only verified this with ppc, but I should be
> > able to verify it with x86 soon.
> 
> That's because it abuses do_generic_file_read.  It' the same design mistake
> that also makes loop fail on tmpfs - do_generic_file_read should never have
> been exported from filemap.c..

I see.  Guess I should finally test that tmpfs/loop patch, eh? :-)

I just now crashed Red Hat 7.3 on x86 SMP by compiling in khttpd
and serving files out of a tmpfs.  It crashed with or without my 
earlier patch (http://www.kegel.com/linux/khttpd/khttpd-unbork.patch)
that fixes khttpd crashes with other filesystems.
Guess it wasn't a bug in linuxppc_2_4_devel after all.

I am now switching to ramfs instead of tmpfs to hold my documentroot,
and that should be the end of my khttpd problems.
(There is no disk on the embedded ppc system I'm using, so I have
to use one ram filesystem or another.)
- Dan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: khttpd and tmpfs don't get along?
  2002-05-22 19:20   ` Dan Kegel
@ 2002-05-22 19:33     ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2002-05-22 19:33 UTC (permalink / raw)
  To: Dan Kegel
  Cc: Christoph Hellwig, linux-kernel@vger.kernel.org,
	khttpd-users@lists.alt.org, linuxppc-embedded@lists.linuxppc.org,
	lord

On Wed, May 22, 2002 at 12:20:55PM -0700, Dan Kegel wrote:
> I just now crashed Red Hat 7.3 on x86 SMP by compiling in khttpd
> and serving files out of a tmpfs.  It crashed with or without my 
> earlier patch (http://www.kegel.com/linux/khttpd/khttpd-unbork.patch)
> that fixes khttpd crashes with other filesystems.
> Guess it wasn't a bug in linuxppc_2_4_devel after all.

I doubt it. the use of do_generic_file_read outside of code the filesystem
has selected to use (i.e. generic methods) is FUNDAMENTALLY broken.

Some time ago I though I found a similar bug in XFS, but Steve Lord says
it's not exploitable in real world (XFS uses the generic methods with
additional locking around it).

The only sane soloution is to get rid of that abuse in khttpd, loop and
sys_sendfile.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-05-22 19:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-22  1:40 khttpd and tmpfs don't get along? Dan Kegel
2002-05-22  8:54 ` Christoph Hellwig
2002-05-22 19:20   ` Dan Kegel
2002-05-22 19:33     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox