Zap the implementations of the i386-aout specific cpu_coredump function.

Most of the non-i386 platforms had rather broken implementations anyway.
This commit is contained in:
Peter Wemm 2002-09-07 01:26:34 +00:00
parent 0dafadb731
commit 1a50106e30
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103049
7 changed files with 0 additions and 144 deletions

View File

@ -394,29 +394,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.
*

View File

@ -444,40 +444,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
*/

View File

@ -444,40 +444,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
*/

View File

@ -362,28 +362,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.
*

View File

@ -229,21 +229,6 @@ cpu_throw(void)
panic("cpu_throw() didn't");
}
/*
* 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.
*

View File

@ -229,21 +229,6 @@ cpu_throw(void)
panic("cpu_throw() didn't");
}
/*
* 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.
*

View File

@ -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);