Hi all,
all programs get the argument and environment placed onto the initial
stack in a structure called ps_strings. NetBSD currently doesn't export
the correct version of this structure for 32bit binaries as in it
doesn't use the 32bit version of it. This breaks setproctitle(3) and
other users of it. The attached patch refactors the access in procfs and
kern.proc as well as making it honour 32bit. The Darwin code likely is
still broken, if someone wants to use that, it should be easy to adopt
the changes from copyin_procargs.
Also attached are two programs to test the consistency of the structure
and updating it (so that ps(1) can be used to ensure it works), but I
will leave it to someone with more interest in atf(7) to turn them into
full test cases.