diff options
-rw-r--r-- | sys/alpha/alpha/vm_machdep.c | 23 | ||||
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 34 | ||||
-rw-r--r-- | sys/i386/i386/vm_machdep.c | 34 | ||||
-rw-r--r-- | sys/ia64/ia64/vm_machdep.c | 22 | ||||
-rw-r--r-- | sys/powerpc/aim/vm_machdep.c | 15 | ||||
-rw-r--r-- | sys/powerpc/powerpc/vm_machdep.c | 15 | ||||
-rw-r--r-- | sys/sys/proc.h | 1 |
7 files changed, 0 insertions, 144 deletions
diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c index dc1e52b..c34f9f1 100644 --- a/sys/alpha/alpha/vm_machdep.c +++ b/sys/alpha/alpha/vm_machdep.c @@ -395,29 +395,6 @@ cpu_wait(p) } /* - * Dump the machine specific header information at the start of a core dump. - */ -int -cpu_coredump(td, vp, cred) - struct thread *td; - struct vnode *vp; - struct ucred *cred; -{ - int error; - - /* XXXKSE this is totally bogus! (and insecure) */ - error = vn_rdwr(UIO_WRITE, vp, (caddr_t) td->td_proc->p_uarea, - ctob(UAREA_PAGES), (off_t)0, - UIO_SYSSPACE, IO_UNIT, cred, NOCRED, (int *)NULL, td); - if (error) - return error; - error = vn_rdwr(UIO_WRITE, vp, (caddr_t) td->td_kstack, - ctob(KSTACK_PAGES), (off_t)ctob(UAREA_PAGES), - UIO_SYSSPACE, IO_UNIT, cred, NOCRED, (int *)NULL, td); - return error; -} - -/* * Map an IO request into kernel virtual address space. * * All requests are (re)mapped into kernel VA space. diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 9438af5..926ea9a 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -445,40 +445,6 @@ cpu_wait(p) } /* - * Dump the machine specific header information at the start of a core dump. - */ -int -cpu_coredump(td, vp, cred) - struct thread *td; - struct vnode *vp; - struct ucred *cred; -{ - struct proc *p = td->td_proc; - int error; - caddr_t tempuser; - - tempuser = malloc(ctob(UAREA_PAGES + KSTACK_PAGES), M_TEMP, M_WAITOK | M_ZERO); - if (!tempuser) - return EINVAL; - - bcopy(p->p_uarea, tempuser, sizeof(struct user)); -#if 0 /* XXXKSE - broken, fixme!!!!! td_frame is in kstack! */ - bcopy(td->td_frame, - tempuser + ((caddr_t) td->td_frame - (caddr_t) p->p_uarea), - sizeof(struct trapframe)); -#endif - - 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); - - return error; -} - -/* * Convert kernel VA to physical address */ u_long diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 9438af5..926ea9a 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -445,40 +445,6 @@ cpu_wait(p) } /* - * Dump the machine specific header information at the start of a core dump. - */ -int -cpu_coredump(td, vp, cred) - struct thread *td; - struct vnode *vp; - struct ucred *cred; -{ - struct proc *p = td->td_proc; - int error; - caddr_t tempuser; - - tempuser = malloc(ctob(UAREA_PAGES + KSTACK_PAGES), M_TEMP, M_WAITOK | M_ZERO); - if (!tempuser) - return EINVAL; - - bcopy(p->p_uarea, tempuser, sizeof(struct user)); -#if 0 /* XXXKSE - broken, fixme!!!!! td_frame is in kstack! */ - bcopy(td->td_frame, - tempuser + ((caddr_t) td->td_frame - (caddr_t) p->p_uarea), - sizeof(struct trapframe)); -#endif - - 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); - - return error; -} - -/* * Convert kernel VA to physical address */ u_long diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c index 9236fd2..ec8f7dc 100644 --- a/sys/ia64/ia64/vm_machdep.c +++ b/sys/ia64/ia64/vm_machdep.c @@ -363,28 +363,6 @@ cpu_wait(p) } /* - * Dump the machine specific header information at the start of a core dump. - */ -int -cpu_coredump(td, vp, cred) - struct thread *td; - struct vnode *vp; - struct ucred *cred; -{ - int error; - - error = vn_rdwr(UIO_WRITE, vp, (caddr_t) td->td_proc->p_uarea, - ctob(UAREA_PAGES), (off_t)0, - UIO_SYSSPACE, IO_UNIT, cred, NOCRED, (int *)NULL, td); - if (error) - return error; - error = vn_rdwr(UIO_WRITE, vp, (caddr_t) td->td_kstack, - ctob(KSTACK_PAGES), (off_t)0, - UIO_SYSSPACE, IO_UNIT, cred, NOCRED, (int *)NULL, td); - return error; -} - -/* * Map an IO request into kernel virtual address space. * * All requests are (re)mapped into kernel VA space. diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c index f593364..fe647ec 100644 --- a/sys/powerpc/aim/vm_machdep.c +++ b/sys/powerpc/aim/vm_machdep.c @@ -230,21 +230,6 @@ cpu_throw(void) } /* - * Dump the machine specific header information at the start of a core dump. - */ -int -cpu_coredump(td, vp, cred) - struct thread *td; - struct vnode *vp; - struct ucred *cred; -{ - - return (vn_rdwr(UIO_WRITE, vp, (caddr_t)td->td_proc->p_uarea, - ctob(UAREA_PAGES), (off_t)0, UIO_SYSSPACE, IO_UNIT, cred, NOCRED, - (int *)NULL, td)); -} - -/* * Map an IO request into kernel virtual address space. * * All requests are (re)mapped into kernel VA space. diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index f593364..fe647ec 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -230,21 +230,6 @@ cpu_throw(void) } /* - * Dump the machine specific header information at the start of a core dump. - */ -int -cpu_coredump(td, vp, cred) - struct thread *td; - struct vnode *vp; - struct ucred *cred; -{ - - return (vn_rdwr(UIO_WRITE, vp, (caddr_t)td->td_proc->p_uarea, - ctob(UAREA_PAGES), (off_t)0, UIO_SYSSPACE, IO_UNIT, cred, NOCRED, - (int *)NULL, td)); -} - -/* * Map an IO request into kernel virtual address space. * * All requests are (re)mapped into kernel VA space. diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 249cd6e..9673b25 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -845,7 +845,6 @@ void exit1(struct thread *, int) __dead2; void cpu_fork(struct thread *, struct proc *, struct thread *, int); void cpu_set_fork_handler(struct thread *, void (*)(void *), void *); void cpu_wait(struct proc *); -int cpu_coredump(struct thread *, struct vnode *, struct ucred *); /* New in KSE. */ struct thread *thread_alloc(void); |