summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/src/uts/common/fs/proc/prcontrol.c2
-rw-r--r--usr/src/uts/common/fs/proc/prdata.h1
-rw-r--r--usr/src/uts/common/fs/proc/prvnops.c9
-rw-r--r--usr/src/uts/common/sys/procfs.h4
4 files changed, 11 insertions, 5 deletions
diff --git a/usr/src/uts/common/fs/proc/prcontrol.c b/usr/src/uts/common/fs/proc/prcontrol.c
index d907e7769d..a73a64a4a4 100644
--- a/usr/src/uts/common/fs/proc/prcontrol.c
+++ b/usr/src/uts/common/fs/proc/prcontrol.c
@@ -939,7 +939,7 @@ pr_control32(int32_t cmd, arg32_t *argp, prnode_t *pnp, cred_t *cr)
case PCREAD: /* read from the address space */
case PCWRITE: /* write to the address space */
- if (PROCESS_NOT_32BIT(p))
+ if (PROCESS_NOT_32BIT(p) || (pnp->pr_flags & PR_OFFMAX))
error = EOVERFLOW;
else {
enum uio_rw rw = (cmd == PCREAD)? UIO_READ : UIO_WRITE;
diff --git a/usr/src/uts/common/fs/proc/prdata.h b/usr/src/uts/common/fs/proc/prdata.h
index 1f1b80d0ac..8ea516bf82 100644
--- a/usr/src/uts/common/fs/proc/prdata.h
+++ b/usr/src/uts/common/fs/proc/prdata.h
@@ -185,6 +185,7 @@ typedef struct prnode {
#define PR_INVAL 0x01 /* vnode is invalidated */
#define PR_ISSELF 0x02 /* vnode is a self-open */
#define PR_AOUT 0x04 /* vnode is for an a.out path */
+#define PR_OFFMAX 0x08 /* vnode is a large file open */
/*
* Conversion macros.
diff --git a/usr/src/uts/common/fs/proc/prvnops.c b/usr/src/uts/common/fs/proc/prvnops.c
index 25382e43fc..c84b9d3726 100644
--- a/usr/src/uts/common/fs/proc/prvnops.c
+++ b/usr/src/uts/common/fs/proc/prvnops.c
@@ -340,6 +340,15 @@ propen(vnode_t **vpp, int flag, cred_t *cr, caller_context_t *ct)
}
/*
+ * If this is a large file open, indicate that in our flags -- some
+ * procfs structures are not off_t-neutral (e.g., priovec_t), and
+ * the open will need to be differentiated where 32-bit processes
+ * pass these structures across the user/kernel boundary.
+ */
+ if (flag & FOFFMAX)
+ pnp->pr_flags |= PR_OFFMAX;
+
+ /*
* Do file-specific things.
*/
switch (type) {
diff --git a/usr/src/uts/common/sys/procfs.h b/usr/src/uts/common/sys/procfs.h
index 0c4a48fcdd..f592fd9dcf 100644
--- a/usr/src/uts/common/sys/procfs.h
+++ b/usr/src/uts/common/sys/procfs.h
@@ -65,10 +65,6 @@ extern "C" {
#include <sys/stat.h>
#include <sys/param.h>
-#if !defined(_LP64) && _FILE_OFFSET_BITS == 64
-#error "Cannot use procfs in the large file compilation environment"
-#endif
-
/*
* System call interfaces for /proc.
*/