From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 15 Feb 2011 18:14:02 -0800 From: Anthony Martin To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20110216021402.GA24848@dinah> References: <7481784f81c45e710aaafb9274df7ec5@EXAMPLE> <20110215233448.GA6183@dinah> <5c7fdd93170fe8fa82917564445a9e2a@stanleylieber.com> <0c422a303390d92446dd36292733bffb@stanleylieber.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0c422a303390d92446dd36292733bffb@stanleylieber.com> Subject: Re: [9fans] 9vx on OpenBSD Topicbox-Message-UUID: af4490a6-ead6-11e9-9d60-3106f5b1d025 > % ktrace -d ./9vx -r /n/plan9 -u glenda -g -S > namec #/ > namec #e/terminal > namec #e/cputype > namec #e/rootdir > namec #e/service > namec #e/user > namec #e/sysname > namec #Zplan9/ > namec / > namec #p > namec /proc > namec #~/mntloop > namec #Zplan9/ > namec #s/boot > 9vx panic: vxproc_run: Invalid argument In src/libvx32/openbsd.c:/vxemu_map int s, sel; struct vxproc *vxp; union descriptor desc; ... /*if(emu->datasel == 0){ if ((s = i386_set_ldt(LDT_AUTO_ALLOC, &desc, 1)) < 0) return -1; */ emu->datasel = (s<<3) + 4 + 3; // 4=LDT, 3=RPL if(i386_set_ldt(emu->datasel >> 3, &desc, 1) < 0) return -1; ... The s variable is used un-initialized because of the commented piece of code, causing EINVAL. And since LDT_AUTO_ALLOC is only on FreeBSD or Darwin, you're going to have to get it another way. At least, that's what I think from reading the code since I don't have access to an OpenBSD box. Anthony