From owner-freebsd-current Sat Jan 9 11:39:51 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA03283 for freebsd-current-outgoing; Sat, 9 Jan 1999 11:39:51 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA03276 for ; Sat, 9 Jan 1999 11:39:48 -0800 (PST) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.8.8/8.8.7) with ESMTP id OAA02504; Sat, 9 Jan 1999 14:39:19 -0500 (EST) Date: Sat, 9 Jan 1999 14:39:19 -0500 (EST) From: Brian Feldman X-Sender: green@janus.syracuse.net To: Kenneth Wayne Culver cc: freebsd-current@FreeBSD.ORG Subject: Re: USER_LDT in Linux emulation In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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