Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Dec 2008 12:41:33 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r186562 - head/sys/fs/procfs
Message-ID:  <200812291241.mBTCfXIZ057410@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Dec 29 12:41:32 2008
New Revision: 186562
URL: http://svn.freebsd.org/changeset/base/186562

Log:
  Use curproc->p_sysent->sv_flags bit SV_ILP32 for detection of the 32 bit
  caller, instead of direct comparision with ia32_freebsd_sysvec.
  
  Tested by:	pho
  Approved by:	des
  MFC after:	2 weeks

Modified:
  head/sys/fs/procfs/procfs_map.c

Modified: head/sys/fs/procfs/procfs_map.c
==============================================================================
--- head/sys/fs/procfs/procfs_map.c	Mon Dec 29 12:12:23 2008	(r186561)
+++ head/sys/fs/procfs/procfs_map.c	Mon Dec 29 12:41:32 2008	(r186562)
@@ -46,6 +46,9 @@
 #include <sys/mutex.h>
 #include <sys/proc.h>
 #include <sys/sbuf.h>
+#ifdef COMPAT_IA32
+#include <sys/sysent.h>
+#endif
 #include <sys/uio.h>
 #include <sys/vnode.h>
 
@@ -59,15 +62,6 @@
 #include <vm/vm_page.h>
 #include <vm/vm_object.h>
 
-#ifdef COMPAT_IA32
-#include <sys/procfs.h>
-#include <machine/fpu.h>
-#include <compat/ia32/ia32_reg.h>
-
-extern struct sysentvec ia32_freebsd_sysvec;
-#endif
-
-
 #define MEBUFFERSIZE 256
 
 /*
@@ -104,8 +98,8 @@ procfs_doprocmap(PFS_FILL_ARGS)
 		return (EOPNOTSUPP);
 
 #ifdef COMPAT_IA32
-        if (curthread->td_proc->p_sysent == &ia32_freebsd_sysvec) {
-                if (p->p_sysent != &ia32_freebsd_sysvec)
+        if (curproc->p_sysent->sv_flags & SV_ILP32) {
+                if (!(p->p_sysent->sv_flags & SV_ILP32))
                         return (EOPNOTSUPP);
                 wrap32 = 1;
         }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812291241.mBTCfXIZ057410>