On Tue, 1 Mar 2005, nils toedtmann wrote:

> Unfortunately, within my FC3 UMLs some binaries now crash :-(
> While sysV startup (including network, cron, syslog, sshd),
> bash, find, host, ping, ... all work fine, others like 
> /bin/rpm or /bin/ls segfault. /usr/bin/vim also segfaults, 
> but when it runs within strace, it works (WTF?). I could not 
> produce such segfaults within a debian (woody) UML, yet.
> --snip--
> All segfaults i looked at end with
> 
>   set_thread_area(...) = -1 ENOSYS (Function not implemented)
>   modify_ldt(...) = 0
>   --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> 
> The "set_thread_area(...) = -1 ENOSYS" is normal (or?), 
> since there are no TLS libs any more, ...

Is this how you discourage too-advanced TLS, by deleting or renaming 
/lib/tls/libc.so.6?  It's a good move; an alternative in kernel 2.6.x, if 
you want to avoid mutilating distro files that might get "fixed" in online 
updates, is "export LD_ASSUME_KERNEL=2.4.1" (per BlaisorBlade) in a file in 
/etc/profile.d or your guest's $HOME/.profile or the equivalent for tcsh.  
And similarly when starting the UML kernel.  SuSE provides a startup script 
exporting 2.4.21 and I've found that this is enough with kernel 2.6.8 and 
glibc-2.3.3.  (I don't actually know if there was a change in TLS style 
between these endpoint versions.)

When I was having TLS problems, though, "ls" ran and "host" crashed, for 
me on the guest without LD_ASSUME_KERNEL.

Am I right that Debian Woody has a 2.4.x kernel, using a different TLS 
method, which UML can deal with?

> so it comes down to
> "modify_ldt". Maybe it's not coincidence that one of the
> kernel files i patched was arch/xen/i386/kernel/ldt.c ...? 
> (ooops, yet another wild guess)

Evidently the LDT is being monkeyed with despite your efforts.  I notice 
that arch/um/sys-i386/kernel/ldt.c actually does something with PTRACE_LDT 
(not in the man page for ptrace) with SKAS, but with TT (as I've seen 
mentioned here and there) there is a separate host process per guest 
process, and ldt.c just passes the call through to the host O.S.  Comments 
on this list indicate that LDT with SKAS is actively being developed but 
that progress is very difficult.

If the XEN guest is not crashing, maybe the XEN people have some ideas for 
handling the LDT that could be made useful in UML.


James F. Carter          Voice 310 825 2897    FAX 310 206 6673
UCLA-Mathnet;  6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA 90095-1555
Email: [EMAIL PROTECTED]  http://www.math.ucla.edu/~jimc (q.v. for PGP key)


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
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