[Lguest] set_thread_area() fails in lguest

Elisha Choe elishachoe at hotmail.com
Fri Feb 18 05:53:53 EST 2011





Hi,

 

I am trying to call set_thread_area() (syscall(243, ) in lguest guest machine, and I am getting:
[   81.364146] set_thread_area[848] general protection ip:b7f1d5db sp:bfaac13c error:0 in ld-2.11.2.so[b7f10000+1b000]

I tried it in debian 2.6.30 and kernel.org's 2.6.36 (Segmentation fault) kernel but got the same result.

I am running the set_thread_area02.c from:
http://ossipedia.ipa.go.jp/crackerjack/cjk/system_calls/265.html

#include <stdio.h>
#include <errno.h>
#include <linux/unistd.h>
#include <asm/ldt.h>

int main(int ac, char **av)
{
    struct user_desc u_info;
    u_info.entry_number = 6;
    int result = syscall(244, &u_info);    //call get_thread_area()
    if(result == -1)
    {
        printf("FAIL ------ call get_thread_area() failed with errno:%d\n", errno);
        return -1;
    }
    u_info.entry_number = -1;
    result = syscall(243, &u_info);        //call set_thread_area()
    if(result == 0)
    {
        printf("PASS ------ \n");
        return 0;
    }
    else
    {
        printf("FAIL ------ call set_thread_area() failed with errno:%d\n", errno);
        return -1;
    }
}

We are trying to run wine under lguest and this is the first problem we encountered.

Is this possible? Any suggestions in getting this to work?

Thank you

Elisha
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/lguest/attachments/20110217/dfe6cd18/attachment.html>


More information about the Lguest mailing list