From: Werner Almesberger <wa@almesberger.net>
To: Jeff Dike <jdike@addtoit.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] uml-patch-2.6.7-2
Date: Fri, 27 Aug 2004 04:10:56 -0300 [thread overview]
Message-ID: <20040827041056.A3753@almesberger.net> (raw)
In-Reply-To: <200408190301.i7J30xek004150@ccure.user-mode-linux.org>; from jdike@addtoit.com on Wed, Aug 18, 2004 at 11:00:59PM -0400
Jeff Dike wrote:
> hostfs and humfs are still somewhat dodgy on 2.6.
Opening files for writing even if we only want to read them causes
a number of problems: first, if I fire up a UML system that shares
root with the host, and I'm root, it will fail to load things like
bash, because it can't open it for writing. This trivial patch
works around that:
--- linux-2.6.7/fs/hostfs/host_fs.c.orig Fri Aug 27 03:55:48 2004
+++ linux-2.6.7/fs/hostfs/host_fs.c Fri Aug 27 03:56:17 2004
@@ -175,7 +175,7 @@
if(err == -EISDIR)
goto out;
- if(err == -EACCES)
+ if(err == -EACCES || err == -ETXTBSY)
err = host_open_file(path, 1, 0, &hf->fh);
if(err)
Unfortunately, the problem also happens in the opposite direction.
E.g. if the UML kernel has opened an executable for writing, that
executable is no longer executable on the host. Open file caching
makes this even worse. In fact, it may be a bad idea to cache a
file open for writing at all, if an execute bit gets set, or if it
is already set.
A possible, but IMHO not very nice, work-around would be to run as
a user who isn't allowed to write to anything the host might want
to execute.
- Werner
--
_________________________________________________________________________
/ Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2004-08-27 7:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-19 3:00 [uml-devel] uml-patch-2.6.7-2 Jeff Dike
2004-08-19 3:00 ` uml-patch-2.6.7-2 Jeff Dike
2004-08-27 7:10 ` Werner Almesberger [this message]
2004-09-05 19:35 ` [uml-devel] uml-patch-2.6.7-2 BlaisorBlade
2004-09-08 23:15 ` Jeff Dike
2004-09-05 15:35 ` BlaisorBlade
2004-09-05 20:28 ` [uml-devel] Current state of UML Jeff Garzik
2004-09-06 17:56 ` BlaisorBlade
2004-09-07 4:40 ` Jeff Garzik
2004-09-07 5:05 ` Adam Heath
2004-09-07 5:13 ` Jeff Garzik
2004-09-07 5:39 ` Adam Heath
2004-09-07 18:13 ` [uml-devel] Current state of UML - some help needed from mainline BlaisorBlade
2004-09-07 18:13 ` BlaisorBlade
2004-09-09 5:30 ` Jeff Garzik
2004-09-09 5:30 ` Jeff Garzik
2004-09-08 20:40 ` [uml-devel] Re: Current state of UML Jeff Dike
2004-09-09 0:35 ` [uml-devel] uml-patch-2.6.7-2 Jeff Dike
2004-09-09 0:35 ` Jeff Dike
2004-09-11 14:41 ` BlaisorBlade
2004-09-11 14:41 ` BlaisorBlade
2004-09-07 21:16 ` [uml-devel] Compiling UML 2.6.8.1 with Static Linking results in segfault Michael Ralston
2004-09-08 0:18 ` Jeff Dike
2004-09-07 23:57 ` Michael Ralston
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=20040827041056.A3753@almesberger.net \
--to=wa@almesberger.net \
--cc=jdike@addtoit.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.