summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs/procfs_fpregs.c
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/procfs_fpregs.c
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/procfs_fpregs.c')
-rw-r--r--sys/fs/procfs/procfs_fpregs.c6
1 files changed, 3 insertions, 3 deletions
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);
}
OpenPOWER on IntegriCloud