kern_exec.c (2caecceeb5f2099e400de3515a0e28ee619c9b0f) | kern_exec.c (4c56fcdead10b8ef044580b72b01ed8c6bb2525b) |
---|---|
1/* 2 * Copyright (c) 1993, David Greenman 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/* 2 * Copyright (c) 1993, David Greenman 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $Id: kern_exec.c,v 1.88 1998/10/28 13:36:58 dg Exp $ | 26 * $Id: kern_exec.c,v 1.89 1998/12/16 16:06:27 bde Exp $ |
27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/sysproto.h> 32#include <sys/signalvar.h> 33#include <sys/kernel.h> 34#include <sys/mount.h> --- 26 unchanged lines hidden (view full) --- 61#include <vm/vm_object.h> 62#include <vm/vm_zone.h> 63#include <vm/vm_pager.h> 64 65#include <machine/reg.h> 66 67static long *exec_copyout_strings __P((struct image_params *)); 68 | 27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/sysproto.h> 32#include <sys/signalvar.h> 33#include <sys/kernel.h> 34#include <sys/mount.h> --- 26 unchanged lines hidden (view full) --- 61#include <vm/vm_object.h> 62#include <vm/vm_zone.h> 63#include <vm/vm_pager.h> 64 65#include <machine/reg.h> 66 67static long *exec_copyout_strings __P((struct image_params *)); 68 |
69SYSCTL_LONG(_kern, KERN_PS_STRINGS, ps_strings, CTLFLAG_RD, 0, 70 (u_long)PS_STRINGS, ""); | 69SYSCTL_LONG(_kern, KERN_PS_STRINGS, ps_strings, CTLFLAG_RD, 0, PS_STRINGS, ""); |
71SYSCTL_LONG(_kern, KERN_USRSTACK, usrstack, CTLFLAG_RD, 0, USRSTACK, ""); 72 73/* 74 * Each of the items is a pointer to a `const struct execsw', hence the 75 * double pointer here. 76 */ 77static const struct execsw **execsw; 78 --- 464 unchanged lines hidden (view full) --- 543 long *stack_base; 544 struct ps_strings *arginfo; 545 int szsigcode; 546 547 /* 548 * Calculate string base and vector table pointers. 549 * Also deal with signal trampoline code for this exec type. 550 */ | 70SYSCTL_LONG(_kern, KERN_USRSTACK, usrstack, CTLFLAG_RD, 0, USRSTACK, ""); 71 72/* 73 * Each of the items is a pointer to a `const struct execsw', hence the 74 * double pointer here. 75 */ 76static const struct execsw **execsw; 77 --- 464 unchanged lines hidden (view full) --- 542 long *stack_base; 543 struct ps_strings *arginfo; 544 int szsigcode; 545 546 /* 547 * Calculate string base and vector table pointers. 548 * Also deal with signal trampoline code for this exec type. 549 */ |
551 arginfo = PS_STRINGS; | 550 arginfo = (struct ps_strings *)PS_STRINGS; |
552 szsigcode = *(imgp->proc->p_sysent->sv_szsigcode); 553 destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE - 554 roundup((ARG_MAX - imgp->stringspace), sizeof(char *)); 555 556 /* 557 * install sigcode 558 */ 559 if (szsigcode) --- 198 unchanged lines hidden --- | 551 szsigcode = *(imgp->proc->p_sysent->sv_szsigcode); 552 destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE - 553 roundup((ARG_MAX - imgp->stringspace), sizeof(char *)); 554 555 /* 556 * install sigcode 557 */ 558 if (szsigcode) --- 198 unchanged lines hidden --- |