On mercoledì 28 marzo 2007, Pravin wrote:
> > Now, again, I need to know:
> >
> > - distribution
> > - host kernel
>
> I am running "Debian" on my machine. Its "2.6.18" and version #1 Fri
> Nov 10 16:55:51 IST 2006.
>
> > - glibc version used
>
> glibc version is 1.2.10
> {{{
> $glib-config --version
> 1.2.10
> }}}
That's not it, the right command to run is this:
/lib/libc.so.6

glib is GTK and gnome-related, glibc is the base C library (Gnu LIBrary for 
C).

> I guess, I know the problem now...
> When I tried to compile vanilla kernel-2.6.18 with "make linux
> ARCH=um" gives following errors, and I had to do these modifications
> to make it compile. And one of the modification is about "getpid()".
This error is fixed in latest -stable tree for 2.6.18. I already suggested you 
to use that "in general".

Get back a vanilla 2.6.18 tree and apply just this patch, all your errors 
(except maybe the PAGE_SHIFT one, please report if you have problems) have 
been fixed:

http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.18.8.bz2

> Here I am giving u the error, and what I did for that.
>
> This error comes because "arch/um/os-Linux/process.c" has following
> statement {{{
> inline _syscall0(pid_t, getpid)
> }}}
> And this statement is the one which is giving error.
> When I commented it, the compilation went ahead.
>
> Now, I can see that how this small modification of mine has created the
> problem.
Yes.... Grrrrr!
> Can u tell me, what should I do with this statement so that I will 
> get rid of above error ?

> ---------------------------------------------------------------------------
>--- There were few other errors also which I came across in compilation
> process. Here I am giving all of them bellow...
> {{{
> }}}
> Here, I added
> {{{
> #define PAGE_SHIFT 12
> }}}

That's the correct value, but still 2.6.18- latest stable should compile 
without changes (so please test it vanilla).

> This error is similar to the first error that I was getting,
> This time, It was for following line in "arch/um/os-Linux/sys-i386/tls.c"
> {{{
>  static _syscall1(int, get_thread_area, user_desc_t *, u_info);
> }}}
> So, I again commented this line also.

This is fixed in -stable too.

> Here, "get_thread_area" function name is wrong I suppose.
No, this time simply glibc does not supply it (newer glibc's do), it is a 
syscall which we call on the host. You are calling instead the guest 
implementation, which uses indirectly the host syscall.

If you call the function inside UML (i.e. if you use a recent glibc and are 
unlucky enough), with some luck, you might get in-kernel infinite recursion 
(and a crash thereof).

man 2 get_thread_area on a recent system shows up even its manpage.

> After doing some grepping, i got "sys_get_thread_area" name for it.
> So, I modified "get_thread_area" with "sys_get_thread_area".
Wrong change.

> Where I have to add stderr=1 ?
> in UML command-line parameter to UML ?
Yes.
Bye and hope all your problems are solved.
-- 
Inform me of my mistakes, so I can add them to my list!
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to