aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/procfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/procfs')
-rw-r--r--sys/fs/procfs/procfs_dbregs.c6
-rw-r--r--sys/fs/procfs/procfs_fpregs.c6
-rw-r--r--sys/fs/procfs/procfs_regs.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c
index 722e4cf5be9b..efa4e14d668d 100644
--- a/sys/fs/procfs/procfs_dbregs.c
+++ b/sys/fs/procfs/procfs_dbregs.c
@@ -51,6 +51,7 @@
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/ptrace.h>
+#include <sys/sysent.h>
#include <sys/uio.h>
#include <machine/reg.h>
@@ -63,7 +64,6 @@
#include <machine/fpu.h>
#include <compat/ia32/ia32_reg.h>
-extern struct sysentvec ia32_freebsd_sysvec;
/*
* PROC(write, dbregs, td2, &r) becomes
* proc_write_dbregs(td2, &r) or
@@ -107,8 +107,8 @@ procfs_doprocdbregs(PFS_FILL_ARGS)
td2 = FIRST_THREAD_IN_PROC(p);
#ifdef COMPAT_IA32
- if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) {
- if (td2->td_proc->p_sysent != &ia32_freebsd_sysvec) {
+ if (SV_CURPROC_FLAG(SV_ILP32)) {
+ if ((td2->td_proc->p_sysent->sv_flags & SV_ILP32) == 0) {
PROC_UNLOCK(p);
return (EINVAL);
}
diff --git a/sys/fs/procfs/procfs_fpregs.c b/sys/fs/procfs/procfs_fpregs.c
index 25412d83e7e2..43af53e3ce59 100644
--- a/sys/fs/procfs/procfs_fpregs.c
+++ b/sys/fs/procfs/procfs_fpregs.c
@@ -45,6 +45,7 @@
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/ptrace.h>
+#include <sys/sysent.h>
#include <sys/uio.h>
#include <machine/reg.h>
@@ -57,7 +58,6 @@
#include <machine/fpu.h>
#include <compat/ia32/ia32_reg.h>
-extern struct sysentvec ia32_freebsd_sysvec;
/*
* PROC(write, fpregs, td2, &r) becomes
* proc_write_fpregs(td2, &r) or
@@ -102,8 +102,8 @@ procfs_doprocfpregs(PFS_FILL_ARGS)
/* XXXKSE: */
td2 = FIRST_THREAD_IN_PROC(p);
#ifdef COMPAT_IA32
- if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) {
- if (td2->td_proc->p_sysent != &ia32_freebsd_sysvec) {
+ if (SV_CURPROC_FLAG(SV_ILP32)) {
+ if ((td2->td_proc->p_sysent->sv_flags & SV_ILP32) == 0) {
PROC_UNLOCK(p);
return (EINVAL);
}
diff --git a/sys/fs/procfs/procfs_regs.c b/sys/fs/procfs/procfs_regs.c
index 481c05347160..82922fbe8974 100644
--- a/sys/fs/procfs/procfs_regs.c
+++ b/sys/fs/procfs/procfs_regs.c
@@ -45,6 +45,7 @@
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/ptrace.h>
+#include <sys/sysent.h>
#include <sys/uio.h>
#include <machine/reg.h>
@@ -57,7 +58,6 @@
#include <machine/fpu.h>
#include <compat/ia32/ia32_reg.h>
-extern struct sysentvec ia32_freebsd_sysvec;
/*
* PROC(write, regs, td2, &r) becomes
* proc_write_regs(td2, &r) or
@@ -102,8 +102,8 @@ procfs_doprocregs(PFS_FILL_ARGS)
/* XXXKSE: */
td2 = FIRST_THREAD_IN_PROC(p);
#ifdef COMPAT_IA32
- if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) {
- if (td2->td_proc->p_sysent != &ia32_freebsd_sysvec) {
+ if (SV_CURPROC_FLAG(SV_ILP32)) {
+ if ((td2->td_proc->p_sysent->sv_flags & SV_ILP32) == 0) {
PROC_UNLOCK(p);
return (EINVAL);
}