Author: nwhitehorn
Date: Wed Mar 24 03:13:24 2010
New Revision: 205574
URL: http://svn.freebsd.org/changeset/base/205574
Log:
The nargvstr and nenvstr properties of arginfo are ints, not longs,
so should be copied to userspace with suword32() instead of suword().
This alleviates problems on 64-bit big-endian architectures, and is a
no-op on all 32-bit architectures.
Tested on: amd64, sparc64, powerpc64
Modified:
head/sys/kern/kern_exec.c
Modified: head/sys/kern/kern_exec.c
==============================================================================
--- head/sys/kern/kern_exec.c Wed Mar 24 03:07:35 2010 (r205573)
+++ head/sys/kern/kern_exec.c Wed Mar 24 03:13:24 2010 (r205574)
@@ -1260,7 +1260,7 @@ exec_copyout_strings(imgp)
* Fill in "ps_strings" struct for ps, w, etc.
*/
suword(&arginfo->ps_argvstr, (long)(intptr_t)vectp);
- suword(&arginfo->ps_nargvstr, argc);
+ suword32(&arginfo->ps_nargvstr, argc);
/*
* Fill in argument portion of vector table.
@@ -1276,7 +1276,7 @@ exec_copyout_strings(imgp)
suword(vectp++, 0);
suword(&arginfo->ps_envstr, (long)(intptr_t)vectp);
- suword(&arginfo->ps_nenvstr, envc);
+ suword32(&arginfo->ps_nenvstr, envc);
/*
* Fill in environment portion of vector table.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"