summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-03-02 18:43:50 +0000
committerkib <kib@FreeBSD.org>2009-03-02 18:43:50 +0000
commitc672211541895fab644fcd12bb285ea5294f85f5 (patch)
tree5f5d7fb10b6b06ba54298bb9f7cd6d0cabab9055 /sys/fs/procfs
parent9c1d9573361b5e7cd3cbe74b0f747372ed7677a8 (diff)
downloadFreeBSD-src-c672211541895fab644fcd12bb285ea5294f85f5.zip
FreeBSD-src-c672211541895fab644fcd12bb285ea5294f85f5.tar.gz
Use the p_sysent->sv_flags flag SV_ILP32 to detect 32bit process
executing on 64bit kernel. This eliminates the direct comparisions of p_sysent with &ia32_freebsd_sysvec, that were left intact after r185169.
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 722e4cf..efa4e14 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 25412d8..43af53e 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 481c053..82922fb 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);
}
OpenPOWER on IntegriCloud