Skip to contentSkip to conversation

nptl/sys_clone fix for i386/ppc

PATCH David Jeffery 2 participants 2 messages Sep 8, 2004 1 message not in the archive User-mode Linux (UML)

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 6 lines · Michael Ralston

I've been testing out this patch...

It seems it allows me to start a uml-2.6.8.1 with SKAS using libc6-2.3.2. I'm not sure if programs that make use of NPTL are running correctly though.

It depends on what part of pthreads the programs use. My patch only fixes basic thread creation. If you run the pthread test suite from LSB, you'll find there is alot still broken. Sorry for my patch sounding more impressive than it was. The few pthread things I ran work but they didn't make extensive use of the nptl's pthread features. I'm going to try and look at what's broken but no guarantees I'll know how to fix it.

David Jeffery

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#2 lore raw
Quoted 7 lines · David Jeffery
Quoted 5 lines · Michael Ralston

I've been testing out this patch...

It seems it allows me to start a uml-2.6.8.1 with SKAS using libc6-2.3.2. I'm not sure if programs that make use of NPTL are running correctly though.

Quoted 7 lines

It depends on what part of pthreads the programs use. My patch only fixes basic thread creation. If you run the pthread test suite from LSB, you'll find there is alot still broken. Sorry for my patch sounding more impressive than it was. The few pthread things I ran work but they didn't make extensive use of the nptl's pthread features. I'm going to try and look at what's broken but no guarantees I'll know how to fix it.

Ok, now that seems reasonable.

The biggest problem are these two syscalls (this is a quote from arch/um/kernel/sys_call_table.c):

[ __NR_set_thread_area ] (syscall_handler_t *) sys_ni_syscall, [ __NR_get_thread_area ] (syscall_handler_t *) sys_ni_syscall,

We've always been knowing that the problem is setting the TLS space - on i386 you do it by allocating a memory area for each thread and setting a reference to it(to change on thread switching) in the GDT (a special memory area handled by the CPU).
However, it should be possible to make them work - see modify_ldt implementation in SKAS mode to understand how.

Bye

Signature · 13 lines
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel