Re: [uml-devel] system call accessing the host os

2006-04-07 Thread Olivier Crameri
Great, thanks a lot. Now I understand what's happening. It was actually calling um_vmalloc Olivier On 7 avr. 06, at 01:42, Jeff Dike wrote: On Fri, Apr 07, 2006 at 02:20:00AM +0200, Blaisorblade wrote: No, I made it "greater than 4k" in 2.4.24 time... in fact it's what's happening to h

Re: [uml-devel] system call accessing the host os

2006-04-06 Thread Jeff Dike
On Fri, Apr 07, 2006 at 02:20:00AM +0200, Blaisorblade wrote: > No, I made it "greater than 4k" in 2.4.24 time... in fact it's what's > happening to him (see his last mail): Oh yeah. In that case, the memset thing I mentioned earlier might help. Jeff --

Re: [uml-devel] system call accessing the host os

2006-04-06 Thread Blaisorblade
On Wednesday 05 April 2006 20:18, Jeff Dike wrote: > On Wed, Apr 05, 2006 at 07:16:22PM +0200, Olivier Crameri wrote: > > Unfortunately, I'm having some weird issues that I can't really > > understand. I can read the file using fread, but only in a buffer > > that I allocated using um_kmalloc. If I

Re: [uml-devel] system call accessing the host os

2006-04-06 Thread Olivier Crameri
Then, when I use fread to read my file into this buffer, if I read a small number of bytes, it works. However when I try to fread the entire file (38k), fread returns 0. What's the break point between working and non-working? It looks like it's on a page boundary. 4095 bytes is ok, 4096 i

Re: [uml-devel] system call accessing the host os

2006-04-05 Thread Jeff Dike
On Wed, Apr 05, 2006 at 10:20:44PM +0200, Olivier Crameri wrote: > Thanks for the answer. I bumped CONFIG_KERNEL_STACK_ORDER to 3, but it > doesn't help. I didn't think so, since the symptoms were wrong. However, keep that in the back of your mind since you're dealing with some piggy parts of lib

Re: [uml-devel] system call accessing the host os

2006-04-05 Thread Olivier Crameri
Thanks for the answer. I bumped CONFIG_KERNEL_STACK_ORDER to 3, but it doesn't help. I have a system call that does nothing but execute my code to parse my file in the host. When I said that using malloc didn't work, I meant the following: I'm using malloc to allocate a buffer in the UML kernel. I

Re: [uml-devel] system call accessing the host os

2006-04-05 Thread Jeff Dike
On Wed, Apr 05, 2006 at 07:16:22PM +0200, Olivier Crameri wrote: > Unfortunately, I'm having some weird issues that I can't really > understand. I can read the file using fread, but only in a buffer > that I allocated using um_kmalloc. If I use a buffer allocated by > malloc, the fread fails.

Re: [uml-devel] system call accessing the host os

2006-04-05 Thread D. Bahi
what about this? http://user-mode-linux.sourceforge.net/iomem.html Olivier Crameri wrote: > Hi, > > I'm currently working on a project in which we are using UML to access > the host os and perform some operations. > More precisely, we would like to have a system call in UML that parses > a file i

Re: [uml-devel] system call accessing the host os

2006-04-05 Thread D. Bahi
well there are several examples of this in the arch/um/drivers area. _user.c and _kern.c break out the userspace and kernel space parts of UML's dual personality. Olivier Crameri wrote: > Well, yes, I could use this. > > But what I'm actually trying to understand is how to properly execute > regul

Re: [uml-devel] system call accessing the host os

2006-04-05 Thread Olivier Crameri
Well, yes, I could use this. But what I'm actually trying to understand is how to properly execute regular C within the UML kernel to access the host OS. Thks, Olivier On 5 avr. 06, at 19:18, D. Bahi wrote: what about this? http://user-mode-linux.sourceforge.net/iomem.html Olivier Crame

[uml-devel] system call accessing the host os

2006-04-05 Thread Olivier Crameri
Hi, I'm currently working on a project in which we are using UML to access the host os and perform some operations. More precisely, we would like to have a system call in UML that parses a file in the host os. Since the UML kernel is a host process, I naively thought that I could use regu