tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ps_strings refactoring & compat32 fix



On Wed, 2 Mar 2011, Joerg Sonnenberger wrote:

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.

If the patch gets committed, I'll take on the job of atf-ifying the tests.


-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index