diff options
author | das <das@FreeBSD.org> | 2004-11-27 06:46:45 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2004-11-27 06:46:45 +0000 |
commit | 7f13dc5af0e2ff7946d78cc129ec850a69a53637 (patch) | |
tree | 86efb4b8942b20d8d54948cf17604123a221f8d9 /sys/i386 | |
parent | 86bc3e16fcede40fa3914bcf8e002db9f36cff70 (diff) | |
download | FreeBSD-src-7f13dc5af0e2ff7946d78cc129ec850a69a53637.zip FreeBSD-src-7f13dc5af0e2ff7946d78cc129ec850a69a53637.tar.gz |
Axe the semblance of support for PECOFF and Linux a.out core dumps.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/linux/linux_sysvec.c | 54 |
1 files changed, 2 insertions, 52 deletions
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 8319c03..11f8981 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include <sys/syscallsubr.h> #include <sys/sysent.h> #include <sys/sysproto.h> -#include <sys/user.h> #include <sys/vnode.h> #include <vm/vm.h> @@ -65,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include <machine/cpu.h> #include <machine/md_var.h> +#include <machine/pcb.h> #include <i386/linux/linux.h> #include <i386/linux/linux_proto.h> @@ -94,8 +94,6 @@ MALLOC_DEFINE(M_LINUX, "linux", "Linux mode structures"); #define LINUX_SYS_linux_rt_sendsig 0 #define LINUX_SYS_linux_sendsig 0 -#define uarea_pages 1 - extern char linux_sigcode[]; extern int linux_szsigcode; @@ -725,54 +723,6 @@ linux_prepsyscall(struct trapframe *tf, int *args, u_int *code, caddr_t *params) *params = NULL; /* no copyin */ } - - -/* - * Dump core, into a file named as described in the comments for - * expand_name(), unless the process was setuid/setgid. - */ -static int -linux_aout_coredump(struct thread *td, struct vnode *vp, off_t limit) -{ - struct proc *p = td->td_proc; - struct ucred *cred = td->td_ucred; - struct vmspace *vm = p->p_vmspace; - char *tempuser; - int error; - - if (ctob((uarea_pages + kstack_pages) + - vm->vm_dsize + vm->vm_ssize) >= limit) - return (EFAULT); - tempuser = malloc(ctob(uarea_pages + kstack_pages), M_TEMP, - M_WAITOK | M_ZERO); - if (tempuser == NULL) - return (ENOMEM); - PROC_LOCK(p); - fill_user(p, (struct user *)tempuser); - PROC_UNLOCK(p); - bcopy(td->td_frame, - tempuser + ctob(uarea_pages) + - ((caddr_t)td->td_frame - (caddr_t)td->td_kstack), - sizeof(struct trapframe)); - error = vn_rdwr(UIO_WRITE, vp, (caddr_t)tempuser, - ctob(uarea_pages + kstack_pages), - (off_t)0, UIO_SYSSPACE, IO_UNIT, cred, NOCRED, - (int *)NULL, td); - free(tempuser, M_TEMP); - if (error == 0) - error = vn_rdwr(UIO_WRITE, vp, vm->vm_daddr, - (int)ctob(vm->vm_dsize), - (off_t)ctob(uarea_pages + kstack_pages), UIO_USERSPACE, - IO_UNIT | IO_DIRECT, cred, NOCRED, (int *) NULL, td); - if (error == 0) - error = vn_rdwr_inchunks(UIO_WRITE, vp, - (caddr_t)trunc_page(USRSTACK - ctob(vm->vm_ssize)), - round_page(ctob(vm->vm_ssize)), - (off_t)ctob(uarea_pages + kstack_pages) + - ctob(vm->vm_dsize), UIO_USERSPACE, - IO_UNIT | IO_DIRECT, cred, NOCRED, NULL, td); - return (error); -} /* * If a linux binary is exec'ing something, try this image activator * first. We override standard shell script execution in order to @@ -848,7 +798,7 @@ struct sysentvec linux_sysvec = { &linux_szsigcode, linux_prepsyscall, "Linux a.out", - linux_aout_coredump, + NULL, exec_linux_imgact_try, LINUX_MINSIGSTKSZ, PAGE_SIZE, |