Subject: Bug in kern_exec.c ?
To: None <tech-kern@netbsd.org>
From: Jaromír Dolecek <dolecek@ics.muni.cz>
List: tech-kern
Date: 11/30/2000 13:41:42
Hi,
while looking on differences between sys_execve() and netbsd32_execve(),
I noticed this:

@@ -235,8 +248,7 @@
        }
 
        /* fill process ps_strings info */
-       p->p_psstr = (struct ps_strings *)(vm->vm_minsaddr
-               - sizeof(struct ps_strings));
+       p->p_psstr = (struct ps_strings *)(stack - sizeof(struct ps_strings));
        p->p_psargv = offsetof(struct ps_strings, ps_argvstr);
        p->p_psnargv = offsetof(struct ps_strings, ps_nargvstr);
        p->p_psenv = offsetof(struct ps_strings, ps_envstr);

i.e. sys_execve() uses (the non-aligned) value of vm->vm_minsaddr,
whereas netbsd32_execve() uses 'stack'.

Is this a bug and sys_execve() should use 'stack' as well, or this is
a netbsd32 weirdness ?

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
@@@@  Wanna a real operating system ? Go and get NetBSD, damn!  @@@@