From owner-freebsd-current Thu Mar 25 10:44:28 1999 Delivered-To: freebsd-current@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 1FABC152E4 for ; Thu, 25 Mar 1999 10:44:26 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.1/8.9.1) with ESMTP id KAA04454; Thu, 25 Mar 1999 10:44:06 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.2/8.9.1) id KAA03085; Thu, 25 Mar 1999 10:44:06 -0800 (PST) (envelope-from jdp@polstra.com) Date: Thu, 25 Mar 1999 10:44:06 -0800 (PST) Message-Id: <199903251844.KAA03085@vashon.polstra.com> To: dg@root.com Subject: Re: latest -current doesn't execute BSDI-binary bladeenc In-Reply-To: <199903170258.SAA01200@implode.root.com> Organization: Polstra & Co., Seattle, WA Cc: current@freebsd.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <199903170258.SAA01200@implode.root.com>, David Greenman wrote: > A much better solution would be for someone to spend the time to > implement the needed VM frobbing of modifying, at BSDI binary exec-time, > the ps_strings address constant in the binary's crt0 that is causing the > problem. Is that the only issue as far as the kernel is concerned? If so, there's an easy solution. If %ebx is nonzero on entry to a BSD/OS executable, it is taken to be the ps_strings constant. Otherwise a hard-coded value is used. So all we have to do is arrange for %ebx to have the right value on entry to the program. It looks easy to fix. Add a new member to struct image_params for the ps_strings value, and set it in the various image activators. It should be "PS_STRINGS" (from ) for a BSD/OS binary (a_midmag == 0314), and 0 for all others. Then in kern_exec.c:execve(), pass the value to setregs() as a new parameter. Stuff it into %ebx in i386/machdep.c:setregs(), and ignore it for the other architectures. That should do it. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-interest is the aphrodisiac of belief." -- James V. DeLong To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message