In article <199903170258.saa01...@implode.root.com>,
David Greenman  <d...@root.com> 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 <sys/exec.h>) 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                                               j...@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 majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to