summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1998-08-24 08:39:39 +0000
committerdfr <dfr@FreeBSD.org>1998-08-24 08:39:39 +0000
commit5fdaeb281d55485bff844095417fc1fbe1e45922 (patch)
tree896c704e890ada16cbc9fb366182b5bb739b46ec /sys/kern/kern_exec.c
parent1fb12a8979b46c244de5277f71b805b2fa8a39ad (diff)
downloadFreeBSD-src-5fdaeb281d55485bff844095417fc1fbe1e45922.zip
FreeBSD-src-5fdaeb281d55485bff844095417fc1fbe1e45922.tar.gz
Change various syscalls to use size_t arguments instead of u_int.
Add some overflow checks to read/write (from bde). Change all modifications to vm_page::flags, vm_page::busy, vm_object::flags and vm_object::paging_in_progress to use operations which are not interruptable. Reviewed by: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 41d5ca0..c77fe20 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_exec.c,v 1.83 1998/06/07 17:11:33 dfr Exp $
+ * $Id: kern_exec.c,v 1.84 1998/07/15 06:19:33 bde Exp $
*/
#include <sys/param.h>
@@ -65,16 +65,11 @@
static long *exec_copyout_strings __P((struct image_params *));
-/*
- * XXX trouble here if sizeof(caddr_t) != sizeof(int), other parts
- * of the sysctl code also assumes this, and sizeof(int) == sizeof(long).
- */
static struct ps_strings *ps_strings = PS_STRINGS;
-SYSCTL_INT(_kern, KERN_PS_STRINGS, ps_strings, 0, &ps_strings, 0, "");
+SYSCTL_INTPTR(_kern, KERN_PS_STRINGS, ps_strings, 0, &ps_strings, 0, "");
static caddr_t usrstack = (caddr_t)USRSTACK;
-SYSCTL_INT(_kern, KERN_USRSTACK, usrstack, 0, &usrstack, 0, "");
-
+SYSCTL_INTPTR(_kern, KERN_USRSTACK, usrstack, 0, &usrstack, 0, "");
/*
* execsw_set is constructed for us by the linker. Each of the items
* is a pointer to a `const struct execsw', hence the double pointer here.
@@ -375,7 +370,7 @@ exec_map_first_page(imgp)
break;
if (ma[i]->valid)
break;
- ma[i]->flags |= PG_BUSY;
+ PAGE_SET_FLAG(ma[i], PG_BUSY);
} else {
ma[i] = vm_page_alloc(object, i, VM_ALLOC_NORMAL);
if (ma[i] == NULL)
OpenPOWER on IntegriCloud