Date: Sat, 9 Jan 1999 14:39:19 -0500 (EST) From: Brian Feldman <green@unixhelp.org> To: Kenneth Wayne Culver <culverk@wam.umd.edu> Cc: freebsd-current@FreeBSD.ORG Subject: Re: USER_LDT in Linux emulation Message-ID: <Pine.BSF.4.05.9901091424580.304-100000@janus.syracuse.net> In-Reply-To: <Pine.GSO.3.95q.990109142055.12758A-100000@rac2.wam.umd.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 9 Jan 1999, Kenneth Wayne Culver wrote: > I was wondering: has USER_LDT been incorporated into -current's Linux > Emulation? > You probably mean the modify_ldt (?) syscall for Linux. No, that is not there, and I'm thinking maybe I should probably get it working... but in the meantime I had added syscall 183 and 184 (I can send the module, which needs -DCOMPAT_LINUX_THREADS in the kernel already, since I accidentally clobbered my changes with cvsup before). I was working with this to get WINE working under Linux emu, so I could use WINE threads (clone() working, of course), but I'm having EXTREMELY strange sendmsg() problems (I'll include a bit of transcript afterwards, maybe someone can help). Anyway, if you really want that syscall, I suggest looking at i386_[gs]et_ldt() and WINE's LDT translation code (Linux uses a weird struct to set the ldt, if you can convert from that you're all set). The best way would probably be to make i386_[gs]et_ldt() global, and do something like int linux_modify_ldt(struct proc *p, struct args *uap) { #ifdef USER_LDT long real_ldt[2]; real_ldt = convert_struct_linux_ldt; switch (uap->type) { case SET_LDT: return i386_set_ldt(real_ldt); case GET_LDT: return i386_set_ldt(real_ldt); default: return EINVAL; } #else printf("Linux emu(%d): LDT modification needs USER_LDT\n", p->p_pid); return ENOSYS; #endif } You should be able to find any of the Linux LDT info in wine-xxx/memory/ldt.c. > > > Kenneth Culver > Computer Science Major at the University of Maryland, College Park. > Brian Feldman Science and Technology Student at Oxon Hill High School, Oxon Hill, Maryland. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9901091424580.304-100000>