From: Doug Dumitru <doug@easyco.com>
To: Hannes Schulz <schulz@schwaar.com>,
user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] Patch for buffer overrun in serial/console device logic
Date: Wed, 08 Oct 2003 09:25:29 -0700 [thread overview]
Message-ID: <3F843A79.6060600@easyco.com> (raw)
In-Reply-To: <p05111b00bba97b88a68d@[10.96.96.13]>
Hannes Schulz wrote:
> [...]
>
>> We also have a much messier, in-house patch that we apply to hostfs.c
>> so that root mounts will correctly honor ownerships and rights. Is
>> anyone else working on this. The 2.4.20-5um release appears to have a
>> lot of missing stuff in this area, but if someone else is re-working
>> this, I will put my patch down for a while and wait. Otherwise, I
>> will clean it up and submit it.
>>
>
> I did such a patch (see below). How does yours fix the problem ?
> Unfortunately I have another problem with hostfs: munmap does not write
> out the changes to the file. I looked at the code but I am afraid this
> is beyound me.
[ ... snipped ... ]
My patch was quite a bit more involved.
The problem that I saw was that the actual IO operations in
hostfs_user.c were always being executed as the user that start UML. In
order to get all of the UID/GIDs to map transparently, you have to do
setegid(...) and seteuid(...) operations around all of the IO operations
that have the potential to create a file or directory. This includes
open and a bunch of others. Unfurtunately, the calling UID/GID is never
visible to the functons in hostfs_user.c, so hostfs_kern.c needs a new
call (or new parameters) to pass this down. Umask also needs to travel
down to hostfs_user.c.
My patch is very tangled in with my "transaction journel" that we use
for replication. The replication stuff is very "non trivial" to
implement from a setup point of view, so I don't want to give that to
anyone at this point. Plus, the patch as stands has lots of debugging
lines commented out and is just plain ugly. My reputation would not be
served well to show it to anyone at this point. My real question was
whether there is a need to more transparent UID/GID/UMASK processing to
hostfs (with the caveat that UML must boot root or at least SUID root).
--------------------------------------------------------------------
Doug Dumitru 800-470-2756 (610-237-2000)
EasyCo LLC doug@easyco.com http://easyco.com
--------------------------------------------------------------------
D3, U2, jBase Virtual Servers. Off-site backup over the internet.
Develop/test/deploy from $20/mo. Fast, secure, cheaper than tape.
http://mirroredservers.com http://mirroredbackup.com
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
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:[~2003-10-08 16:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-07 18:55 [uml-devel] Patch for buffer overrun in serial/console device logic Doug Dumitru
2003-10-07 21:51 ` [uml-devel] " Jeff Dike
2003-10-07 22:31 ` Doug Dumitru
2003-10-11 1:49 ` Jeff Dike
2003-10-12 3:39 ` Doug Dumitru
2003-10-13 20:43 ` BlaisorBlade
[not found] ` <p05111b00bba97b88a68d@[10.96.96.13]>
2003-10-08 16:25 ` Doug Dumitru [this message]
2003-11-09 1:53 ` Jeff Dike
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=3F843A79.6060600@easyco.com \
--to=doug@easyco.com \
--cc=schulz@schwaar.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.