* [uml-devel] Hostfs doesn't work - digging the kernel
@ 2004-05-23 9:36 alnsn
2004-05-23 10:26 ` alnsn
2004-05-23 19:51 ` Henrik Nordstrom
0 siblings, 2 replies; 3+ messages in thread
From: alnsn @ 2004-05-23 9:36 UTC (permalink / raw)
To: user-mode-linux-devel
[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]
Hi,
I'm trying to mount hostfs from inside my tiny uml. Host linux is RH9
with linux-2.6.6 and linux-2.4.26 vanilla kernels. UML patch is
2.4.26-1.
Mounting with no -o option results in UML kernel panic because
mount_arg argument is NULL in this case:
char *host_root_filename(char *mount_arg)
{
char *root = DEFAULT_ROOT;
if((mount_arg != NULL) && (*mount_arg != '\0'))
root = mount_arg;
return(uml_strdup(mount_arg));
}
Returning uml_strdup(NULL) causes this panic to happen.
Correct behavior, I think, is return uml_strdup(root).
Even with -o option I can't mount. Function hostfs_init_file composes a
path beginning with jail_dir (/ in my case), then go mount and file.
const char *path[] = { jail_dir, mount, file, NULL };
In my case path is either // or //tmp. The open64 function can't open both.
If I do these transformations:
"//" -> ""
"//tmp" -> "/tmp"
they are mounted but I can't read files.
I suggest always transform path like this. What do you think?
--
Alexander Nasonov
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [uml-devel] Hostfs doesn't work - digging the kernel
2004-05-23 9:36 [uml-devel] Hostfs doesn't work - digging the kernel alnsn
@ 2004-05-23 10:26 ` alnsn
2004-05-23 19:51 ` Henrik Nordstrom
1 sibling, 0 replies; 3+ messages in thread
From: alnsn @ 2004-05-23 10:26 UTC (permalink / raw)
To: user-mode-linux-devel
[-- Attachment #1: Type: text/plain, Size: 593 bytes --]
Alexander Nasonov wrote:
> Even with -o option I can't mount. Function hostfs_init_file composes a
> path beginning with jail_dir (/ in my case), then go mount and file.
> const char *path[] = { jail_dir, mount, file, NULL };
> In my case path is either // or //tmp. The open64 function can't open both.
> If I do these transformations:
> "//" -> ""
> "//tmp" -> "/tmp"
> they are mounted but I can't read files.
> I suggest always transform path like this. What do you think?
Opps, it doesn't work. I wonder how it worked before. I need more digging :)
--
Alexander Nasonov
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [uml-devel] Hostfs doesn't work - digging the kernel
2004-05-23 9:36 [uml-devel] Hostfs doesn't work - digging the kernel alnsn
2004-05-23 10:26 ` alnsn
@ 2004-05-23 19:51 ` Henrik Nordstrom
1 sibling, 0 replies; 3+ messages in thread
From: Henrik Nordstrom @ 2004-05-23 19:51 UTC (permalink / raw)
To: alnsn; +Cc: user-mode-linux-devel
On Sun, 23 May 2004 alnsn@yandex.ru wrote:
> I'm trying to mount hostfs from inside my tiny uml. Host linux is RH9
> with linux-2.6.6 and linux-2.4.26 vanilla kernels. UML patch is
> 2.4.26-1.
Then you need hostfs patches from http://marasystems.com/download/uml/
Regards
Henrik
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-23 19:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-23 9:36 [uml-devel] Hostfs doesn't work - digging the kernel alnsn
2004-05-23 10:26 ` alnsn
2004-05-23 19:51 ` Henrik Nordstrom
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox